:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #141414;
    --card-bg: #1a1a1a;
    --accent-gold: #d4af37;
    --accent-gold-light: #f4e4a6;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --border-color: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-gold: rgba(212, 175, 55, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #1a1a1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.last-updated {
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.header-thanks {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--accent-gold);
    font-style: italic;
    font-weight: 500;
    opacity: 0.9;
}

/* Loading & Error States */
.loading, .error {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin: 20px;
}

/* Telegram Section */
.telegram-section {
    padding: 0 20px 40px;
    margin-bottom: 20px;
}

.telegram-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
    display: flex;
    align-items: center;
    gap: 40px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(212, 175, 55, 0.05) 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.telegram-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
}

.telegram-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px var(--shadow-gold);
    border-color: rgba(212, 175, 55, 0.4);
}

.telegram-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.telegram-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg);
    flex-shrink: 0;
    box-shadow: 0 4px 20px var(--shadow-gold);
}

.telegram-icon svg {
    width: 48px;
    height: 48px;
}

.telegram-info {
    flex: 1;
}

.telegram-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.telegram-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-bg);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-gold);
}

.telegram-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--shadow-gold);
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
}

.telegram-button svg {
    width: 20px;
    height: 20px;
}

.telegram-qr {
    flex-shrink: 0;
}

.qr-container {
    text-align: center;
    background: var(--secondary-bg);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.qr-container:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px var(--shadow-gold);
}

.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: white;
    padding: 15px;
    display: block;
    margin: 0 auto 15px;
    object-fit: contain;
}

.qr-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin: 0 auto 15px;
    color: var(--text-muted);
}

.qr-placeholder svg {
    opacity: 0.5;
}

/* Results Container */
.results-container {
    display: grid;
    gap: 30px;
    padding: 0 20px 40px;
}

/* Category Section */
.category-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px var(--shadow-gold);
    border-color: rgba(212, 175, 55, 0.3);
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--accent-gold);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    overflow: hidden;
}

.results-table thead {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-bottom: 2px solid var(--accent-gold);
}

.results-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.results-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    background: var(--secondary-bg);
}

.results-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.08);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.results-table tbody tr.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-left: 3px solid #ffd700;
}

.results-table tbody tr.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, rgba(192, 192, 192, 0.05) 100%);
    border-left: 3px solid #c0c0c0;
}

.results-table tbody tr.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(205, 127, 50, 0.05) 100%);
    border-left: 3px solid #cd7f32;
}

.results-table td {
    padding: 20px;
    color: var(--text-primary);
    font-size: 1rem;
}

.rank-cell {
    text-align: center;
    width: 80px;
}

.rank {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: inline-block;
    min-width: 40px;
}

.rank.top-1 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank.top-1::before {
    content: '🥇 ';
    margin-right: 5px;
}

.rank.top-2 {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.rank.top-2::before {
    content: '🥈 ';
    margin-right: 5px;
}

.rank.top-3 {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.rank.top-3::before {
    content: '🥉 ';
    margin-right: 5px;
}

.model-name-cell {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.votes-cell {
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.percentage-cell {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
}

.progress-cell {
    width: 200px;
    min-width: 150px;
}

.progress-bar {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-radius: 5px;
    transition: width 1s ease-out;
    box-shadow: 0 0 10px var(--shadow-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 40px 15px 30px;
    }

    .telegram-section {
        padding: 0 10px 30px;
    }

    .telegram-card {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .telegram-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .telegram-icon {
        width: 70px;
        height: 70px;
    }

    .telegram-icon svg {
        width: 40px;
        height: 40px;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .category-section {
        padding: 15px;
        overflow-x: auto;
    }

    .results-table {
        font-size: 0.9rem;
        min-width: 600px;
    }

    .results-table th,
    .results-table td {
        padding: 12px 10px;
    }

    .results-table th {
        font-size: 0.8rem;
    }

    .rank {
        font-size: 1.2rem;
    }

    .model-name-cell {
        font-size: 1rem;
    }

    .progress-cell {
        width: 120px;
        min-width: 100px;
    }

    .progress-bar {
        height: 8px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .results-container {
        grid-template-columns: 1fr;
    }

    .category-section {
        padding: 25px;
    }
}

@media (min-width: 1025px) {
    .results-container {
        grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    }
}

/* Animation for results appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeInUp 0.6s ease-out;
}

.results-table tbody tr {
    animation: fadeInUp 0.4s ease-out;
}

/* Footer Styles */
.footer {
    margin-top: 60px;
    padding: 50px 20px 30px;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.05) 100%);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-heading {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-links li a::before {
    content: '→';
    color: var(--accent-gold);
    margin-right: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    position: absolute;
    left: -15px;
}

.footer-links li a:hover {
    color: var(--accent-gold);
    padding-left: 15px;
    transform: translateX(5px);
}

.footer-links li a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-social {
    display: flex;
     flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px;
}

.social-link svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.social-label {
    font-size: 0.7rem;
    margin-top: 2px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--text-primary);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    color: var(--primary-bg);
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-gold);
    height: auto;
    padding-bottom: 12px;
}

.social-link:hover svg {
    transform: scale(1.1);
}

.social-link:hover .social-label {
    opacity: 1;
    transform: translateY(0);
    color: var(--primary-bg);
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 10;
}

.social-link::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--border-color);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 11;
}

.social-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.social-link:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
    border-top-color: var(--card-bg);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.footer-thanks {
    font-size: 0.95rem;
    color: var(--accent-gold);
    font-style: italic;
    margin: 0;
    font-weight: 500;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 40px 15px 25px;
        margin-top: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        padding-top: 25px;
    }
}

