/* Modern Responsive Design */

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .hero {
        padding: 1.5rem 0;
        padding-top: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        gap: 2.5rem;
        padding: 0 2rem;
        text-align: left;
    }

    .hero-text {
        text-align: center;
        margin-bottom: 2rem;
        align-items: center;
    }

    .hero-stats {
        padding: 1.5rem;
        gap: 1rem;
        max-width: 400px;
        width: 100%;
    }

    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-stats .stat-number {
        font-size: 2rem;
    }

    .map-display {
        margin-top: 1rem;
        z-index: 15;
    }

    #current-map {
        font-size: 1.1rem !important;
    }

    #current-map[title]:hover::after {
        font-size: 0.9rem;
        padding: 8px 12px;
        max-width: 300px;
        word-wrap: normal;
        white-space: nowrap;
    }

    .community {
        padding: 6rem 0;
    }

    .about,
    .servers {
        padding: 5rem 0;
    }

    /* Server Stats */
    .server-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.75rem;
    }

    .stat-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    /* Voting System - Tablet */
    .voting-hero {
        padding: 3rem 2.5rem;
        gap: 2.5rem;
    }

    .voting-hero-icon {
        width: 90px;
        height: 90px;
        font-size: 2.8rem;
    }

    .voting-hero-content h3 {
        font-size: 2rem;
    }

    .voting-features {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 2rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        min-height: 100vh;
        padding: 1.5rem 0;
        padding-top: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1.5rem;
        justify-items: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
        align-self: center;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        align-self: center;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        width: 100%;
        align-self: center;
    }

    .hero-buttons {
        justify-content: center;
        gap: 0.75rem;
        align-self: center;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 1.2rem;
        max-width: 100%;
        justify-self: center;
    }

    .map-display {
        margin: 0;
    }

    .stat-item {
        min-height: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #current-map {
        font-size: 1.5rem !important;
        line-height: 1.1;
    }

    #current-map[title]:hover::after {
        font-size: 0.85rem;
        padding: 7px 11px;
        max-width: 250px;
        word-wrap: normal;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid,
    .features-grid,
    .about-grid,
    .community-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .community {
        padding: 3.8rem 0;
    }

    .about,
    .servers {
        padding: 3.5rem 0;
    }

    /* Server Stats Mobile */
    .server-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 1.25rem;
        gap: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        align-self: center;
    }

    .stat-content {
        text-align: center;
    }

    .stat-label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .stat-value {
        font-size: 1rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 0.5rem 0;
        padding-top: 80px;
    }

    .hero-content {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Server Stats Small Mobile */
    .server-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-value {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Landscape Mobile Styles */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 4rem 0 1rem 0;
        height: 100%;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .stat-item:nth-child(3) {
        grid-column: span 2;
    }

    .map-display {
        width: 100%;
        margin: 0;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 0.8rem;
        width: 100%;
    }

    .hero-buttons {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
    .container {
        padding: 0 3rem;
    }

    .hero-content {
        gap: 6rem;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1.3rem;
        max-width: 600px;
        width: 100%;
    }

    .hero-stats {
        padding: 3rem;
        gap: 2rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 1rem;
    }
}

/* Ultra Wide Desktop Styles */
@media (min-width: 1800px) {
    .container {
        max-width: 1600px;
        padding: 0 4rem;
    }

    .hero-content {
        gap: 8rem;
    }

    .hero-title {
        font-size: 6rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.4rem;
        max-width: 700px;
        width: 100%;
    }

    .hero-stats {
        padding: 4rem;
        gap: 3rem;
    }

    .stat-number {
        font-size: 3.5rem;
    }
}

/* Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid currentColor;
    }

    .dropdown-menu,
    .mobile-menu {
        border: 2px solid currentColor;
    }

    /* Voting System Responsive */
    .voting-hero {
        flex-direction: column;
        padding: 2.5rem 1.8rem;
        gap: 2rem;
        text-align: center;
    }

    .voting-hero-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .voting-hero-content h3 {
        font-size: 1.8rem;
    }

    .voting-hero-content p {
        font-size: 1rem;
    }

    .voting-features {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .commands-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .voting-commands {
        padding: 2.5rem 1.8rem;
    }

    .commands-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Recent Demos - Mobile */
    .recent-demos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .recent-demos-minimal {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .demo-card-minimal {
        padding: 1.2rem;
    }

    .demo-minimal-map {
        font-size: 1.2rem;
    }

    .demo-minimal-score {
        font-size: 1.3rem;
    }

    .demo-minimal-info {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    /* Contact - Mobile */
    .contact-info-only {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-item {
        padding: 1.5rem;
    }

    .contact-item i {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .contact-item h4 {
        font-size: 1.1rem;
    }

    /* Server Info Minimal - Mobile */
    .server-card-minimal {
        padding: 1.5rem;
    }

    .server-header-minimal {
        flex-direction: column;
        gap: 1.2rem;
        align-items: flex-start;
    }

    .server-title-minimal {
        width: 100%;
    }

    .server-status-minimal {
        align-self: flex-start;
    }

    .server-stats-minimal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card-minimal {
        padding: 1rem 1.2rem;
    }

    .connection-item-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .connection-value-minimal {
        width: 100%;
        justify-content: space-between;
    }

    .connection-value-minimal .ip-text {
        font-size: 0.9rem;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .server-actions-minimal {
        flex-direction: column;
    }

    .btn-connect-minimal,
    .btn-info-minimal {
        max-width: 100%;
    }

    /* Old demos styles */
    .demo-card-header {
        padding: 1.5rem 1.5rem 1.2rem;
    }

    .demo-map-name {
        font-size: 1.5rem;
    }

    .demo-map-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .demo-info {
        grid-template-columns: 1fr;
    }

    .demo-team-score {
        font-size: 1.8rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .mobile-menu-overlay,
    .mobile-menu-btn {
        display: none !important;
    }

    .hero {
        padding-top: 0;
    }

    .container {
        padding: 0;
    }
}