/* Responsive Styles */

/* Base container width for all screen sizes */
.container, .main {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Large Screens (Desktops) */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .container_main {
        padding: 0 15px;
    }
}

/* Medium Screens (Tablets) */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .main-header .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }
    
    .logo-text {
        margin: 10px 0;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links a {
        height: 50px;
        line-height: 50px;
    }
    
    .dropdown-menu {
        width: 100%;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-thin);
        border-bottom: 1px solid var(--border-thin);
        margin: 0;
        padding: 0;
    }
    
    /* Exception FIRST: Keep row layout for the MVC news page - must come before general rules */
    body.page_news .container_main {
        flex-direction: row !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 20px !important;
    }
    
    body.page_news .container_main > .container_mid {
        flex: 0 1 1200px !important;
        width: auto !important;
        order: 1 !important;
        margin-bottom: 0 !important;
        margin-left: calc((100% - 1200px - 300px - 20px) / 2) !important;
        margin-right: 0 !important;
    }
    
    body.page_news .container_main > .container_right {
        flex: 0 0 300px !important;
        width: 300px !important;
        order: 2 !important;
        align-self: flex-start !important;
    }
    
    .container_main {
        flex-direction: column;
    }
    
    .container_left {
        width: 100%;
        margin-bottom: 20px;
        order: 2;
    }
    
    .container_mid {
        width: 100%;
        order: 1;
        margin-bottom: 20px;
    }
    
    .container_right {
        width: 100%;
        order: 3;
    }
    
    /* Override: Keep side-by-side layout on desktop screens even in this media query range */
    @media (min-width: 993px) {
        .container_main {
            flex-direction: row !important;
            display: flex !important;
        }
        
        .container_main > .container_mid {
            flex: 0 1 1200px !important;
            order: 1 !important;
            margin-bottom: 0 !important;
        }
        
        .container_main > .container_right {
            flex: 0 0 300px !important;
            order: 2 !important;
            width: 300px !important;
        }
    }
    
    .footer-content {
        gap: 20px;
    }
}

/* Small Screens (Mobile Landscape) */
@media (max-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .main-header .header-content {
        padding: 10px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .auth-buttons {
        margin-left: auto;
    }
    
    .auth-buttons .search-container {
        display: none;
    }
    
    .auth-buttons .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .nav-links a {
        padding: 0 10px;
        font-size: 0.9rem;
    }
    
    .nav-links a i {
        margin-right: 3px;
    }
    
    .left_box,
    .right_box,
    .center_box {
        margin-bottom: 15px;
    }
    
    .box-header {
        padding: 12px 15px;
    }
    
    .box-content {
        padding: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .copyright {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Extra Small Screens (Mobile Portrait) */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .main-header .header-content {
        padding: 8px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .auth-buttons .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .btn-outline {
        display: none;
    }
    
    .box-header h3 {
        font-size: 1.1rem;
    }
    
    .box-header i {
        font-size: 1rem;
    }
    
    .main-footer {
        padding: 30px 0 15px;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
    
    .player-row {
        padding: 8px;
    }
    
    .rank-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .player-name {
        font-size: 0.9rem;
    }
    
    .player-level {
        font-size: 0.8rem;
    }
    
    .news-title {
        font-size: 1.2rem;
    }
    
    .news-date {
        font-size: 0.8rem;
    }
}

/* Fix for Mobile Navigation */
@media (max-width: 992px) {
    .nav-links > li {
        width: 100%;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 10px 15px;
        height: auto;
        line-height: 1.5;
        border-bottom: 1px solid var(--border-thin);
    }
    
    .nav-links > li:last-child a {
        border-bottom: none;
    }
    
    .dropdown-menu {
    width: 100%;
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        border: none;
        background-color: var(--bg-elevated);
    }
    
    .dropdown-menu a {
        padding-left: 30px;
    }
    
    .dropdown-menu a:hover {
        padding-left: 35px;
    }
    
    .nav-links > li:hover .dropdown-menu {
        display: block;
    }
}

/* Fix for Mobile Tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    td, th {
        padding: 10px 8px;
    }
}

/* Fix for Mobile Forms */
@media (max-width: 576px) {
    .loginForm input,
    .searchForm input {
        height: 36px;
        font-size: 0.9rem;
    }
    
    .loginForm button {
        height: 36px;
    }
} 
