/* Custom Styles & Animation System */

:root {
    --primary: #1976D2;
    --primary-light: #42A5F5;
    --primary-dark: #1565C0;
    --secondary: #00BCD4;
    --success: #4CAF50;
    --danger: #F44336;
    --background: #F8FAFC;
    --radius: 20px;
    --glass-background: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(226, 232, 240, 0.8);
}

body {
    background-color: var(--background);
    overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-background);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 
                0 1px 3px 0 rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08),
                0 2px 6px 0 rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

/* Modern Rounded Buttons */
.btn-modern {
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-modern:active {
    transform: scale(0.97);
}

/* Confetti Container overrides */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
}

/* Skeleton Loading Screens */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Glow effects */
.glow-primary {
    box-shadow: 0 0 20px rgba(25, 118, 210, 0.2);
}

.glow-success {
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.4);
}

.glow-cyan {
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.4);
}

/* Leaderboard Rank-up Glow Effect */
.rank-glow-up {
    animation: rankGlow 1.5s ease-in-out;
}

@keyframes rankGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 188, 212, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(0, 188, 212, 0.5);
        transform: scale(1.05);
        border-color: #00BCD4;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 188, 212, 0);
        transform: scale(1);
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Big Vote Button Pulse */
@keyframes votePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(25, 118, 210, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
    }
}

.btn-vote-pulse {
    animation: votePulse 2s infinite;
}

/* Candidate Card Flip/Zoom for Voting */
.cand-card {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.cand-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(25, 118, 210, 0.3);
}

.cand-card.selected {
    border-color: var(--primary);
    background-color: rgba(25, 118, 210, 0.02);
}

/* Live Score Grid Transitions */
.grid-item-transition {
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Custom DataTables Premium Styling */
.dataTables_wrapper {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate {
    font-family: 'Prompt', 'Inter', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.dataTables_filter {
    margin-bottom: 1.25rem !important;
}

.dataTables_filter input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.5rem 1rem !important;
    background-color: rgba(248, 250, 252, 0.5) !important;
    outline: none !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    margin-left: 0.5rem !important;
}

.dataTables_filter input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15) !important;
    background-color: #ffffff !important;
}

.dataTables_length select {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 0.4rem 1.5rem 0.4rem 0.75rem !important;
    background-color: rgba(248, 250, 252, 0.5) !important;
    outline: none !important;
    margin: 0 0.5rem !important;
}

table.dataTable {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border: none !important;
    width: 100% !important;
}

table.dataTable thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 16px !important;
}

table.dataTable tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.dataTables_paginate .paginate_button {
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    padding: 0.5rem 0.85rem !important;
    margin: 0 2px !important;
    font-weight: 700 !important;
    transition: all 0.2s !important;
}

.dataTables_paginate .paginate_button.current, 
.dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2) !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: transparent !important;
}

