/* ===================================
   FreshSMP Staff Panel - Main CSS (Fully Responsive)
   Shared styles, navigation, footer, global
   =================================== */

/* ===================================
   RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: #0d1f2d;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html::before {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    bottom: -100%;
    background: linear-gradient(180deg, #1a3a52 0%, #0d1f2d 100%);
    z-index: -2;
}

:root {
    --primary: #00d4ff;
    --secondary: #0096ff;
    --dark: #0d1f2d;
    --dark-light: #1a3a52;
    --text: #ffffff;
    --text-muted: #a0b5c7;
    --success: #50ffaa;
    --error: #ff5555;
    --warning: #fbbf24;
    
    /* Responsive spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    --spacing-2xl: 60px;
    
    /* Touch targets */
}

body {
    font-family: 'Poppins', sans-serif;
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 150, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 200, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#root {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
}

/* ===================================
   LOADING ANIMATION
   =================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
    padding: var(--spacing-md);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    animation: fadeInOut 2s ease-in-out infinite;
    text-align: center;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loading-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    color: var(--text-muted);
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 212, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===================================
   HEADER SECTION
   =================================== */
.header-section {
    text-align: center;
    padding: 40px 60px 20px;
    background: linear-gradient(180deg, rgba(0, 150, 255, 0.1) 0%, transparent 100%);
    width: 100%;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1600px;
    margin: 0 auto;
}

.discord-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(13, 31, 45, 0.6);
    border: 2px solid rgba(0, 150, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 100px;
}

.discord-button:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 150, 255, 0.3);
}

.discord-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.discord-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-container {
    display: inline-block;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.logo-container:hover {
    transform: scale(1.05) translateY(-5px);
}

.logo-container:hover .header-logo {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.8)) 
            drop-shadow(0 0 60px rgba(0, 212, 255, 0.6));
}

.header-logo {
    height: 140px;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
    transition: filter 0.4s ease;
    max-width: 100%;
}

/* ===================================
   NAVIGATION BAR (Mobile-First)
   =================================== */
.navbar {
    background: rgba(13, 31, 45, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 150, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
    position: relative;
}

.hamburger {
    width: 28px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 12px 24px;
    border-radius: 12px;
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(0, 150, 255, 0.1);
    border-color: rgba(0, 150, 255, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #0096ff 0%, #00d4ff 100%);
    color: var(--text);
    box-shadow: 0 4px 20px rgba(0, 150, 255, 0.5);
    border-color: transparent;
}

.nav-user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 150, 255, 0.1);
    border: 2px solid rgba(0, 150, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-user-button:hover {
    background: rgba(0, 150, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
}

.nav-user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.nav-user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.nav-overlay {
    display: none;
}

/* ===================================
   MOBILE RESPONSIVE (768px and below)
   =================================== */
@media (max-width: 768px) {
    /* Hide header on mobile */
    .header-section {
        display: none;
    }

    /* Show hamburger */
    .nav-toggle {
        display: block;
    }

    .nav-container {
        padding: 12px 15px;
    }

    /* Mobile Menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: rgba(13, 31, 45, 0.98);
        backdrop-filter: blur(20px);
        border-right: 2px solid rgba(0, 150, 255, 0.3);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px 20px 20px;
        gap: 10px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
        overflow-y: auto;
    }

    .nav-links.mobile-open {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 18px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .nav-link i {
        width: 24px;
        font-size: 1.1rem;
    }

    /* Overlay when menu is open */
    .nav-links.mobile-open ~ .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 100;
    }

    /* Hide username on mobile */
    .nav-user-name {
        display: none;
    }

    .nav-user-button {
        padding: 6px;
        border-radius: 50%;
    }

    .nav-user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .nav-links {
        width: 250px;
        padding: 70px 15px 15px;
    }

    .nav-link {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* ===================================
   CONTAINER
   =================================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 60px 80px;
    width: 100%;
}

/* ===================================
   FOOTER - Enhanced Design
   =================================== */
.footer {
    background: linear-gradient(135deg, rgba(13, 31, 45, 0.98) 0%, rgba(26, 58, 82, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(0, 150, 255, 0.3);
    padding: 50px 60px 30px;
    margin-top: 80px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Animated accent line at top */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: footerShimmer 8s linear infinite;
}

@keyframes footerShimmer {
    to { left: 100%; }
}

/* Background pattern */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.5));
    margin-bottom: 25px;
    max-width: 100%;
    transition: all 0.4s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 35px rgba(0, 212, 255, 0.7));
}

.footer-text {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Stats or badges section */
.footer-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 35px 0;
    flex-wrap: wrap;
}

.footer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Divider */
.footer-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 30px auto;
}

.footer-copyright {
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-year {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
}

.footer-year i {
    font-size: 1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .footer {
        padding: 40px 20px 25px;
        margin-top: 50px;
    }
    
    .footer-logo {
        height: 60px;
    }
    
    .footer-text {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .footer-stats {
        gap: 30px;
    }
    
    .footer-stat-value {
        font-size: 1.5rem;
    }
    
    .footer-stat-label {
        font-size: 0.8rem;
    }
    
    .footer-divider {
        width: 80px;
        margin: 25px auto;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 35px 15px 20px;
    }
    
    .footer-logo {
        height: 50px;
    }
    
    .footer-text {
        font-size: 0.95rem;
    }
    
    .footer-stats {
        gap: 25px;
    }
    
    .footer-stat-value {
        font-size: 1.3rem;
    }
    
    .footer-stat-label {
        font-size: 0.75rem;
    }
}

/* ===================================
   ACTION BAR (Toast Notifications)
   =================================== */
.action-bar {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, rgba(13, 31, 45, 0.98) 0%, rgba(26, 58, 82, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 150, 255, 0.3);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    min-width: 350px;
    max-width: 90vw;
    animation: slideInRight 0.4s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.action-bar.success {
    border-color: rgba(80, 255, 170, 0.4);
}

.action-bar.error {
    border-color: rgba(255, 85, 85, 0.4);
}

.action-bar.warning {
    border-color: rgba(251, 191, 36, 0.4);
}

.action-bar-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.action-bar.success .action-bar-icon {
    color: var(--success);
}

.action-bar.error .action-bar-icon {
    color: var(--error);
}

.action-bar.warning .action-bar-icon {
    color: var(--warning);
}

.action-bar-content {
    flex: 1;
}

.action-bar-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.action-bar-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.action-bar-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-bar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-gradient {
    background: linear-gradient(135deg, #00d4ff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 255, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 150, 255, 0.5);
}

/* ===================================
   ENHANCED RESPONSIVE DESIGN
   =================================== */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .container {
        padding: 40px 30px 80px;
    }

    .header-section {
        padding: 40px 30px 20px;
    }

    .nav-container {
        padding: 20px 30px;
    }

    .footer {
        padding: 40px 30px;
    }

    .header-wrapper {
        gap: 40px;
    }
}

/* Tablets */
@media (max-width: 968px) {
    .header-logo {
        height: 100px;
    }

    .header-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .discord-button {
        flex-direction: row;
        padding: 15px 20px;
        min-width: auto;
    }

    .discord-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }

    /* Navigation responsive */
    .nav-toggle {
        display: flex;
    }

    .nav-container {
        flex-wrap: wrap;
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
        order: 3;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .nav-user-button {
        order: 1;
    }

    .footer-links {
        gap: 20px;
    }
}

/* Large Phones and Small Tablets */
@media (max-width: 768px) {
    /* Global adjustments */
    body {
        font-size: 14px;
    }

    .container {
        padding: 30px 20px 60px;
    }

    /* Header Mobile */
    .header-section {
        padding: 30px 20px 15px;
    }

    .header-wrapper {
        gap: 25px;
    }

    .header-logo {
        height: 80px;
    }

    .discord-button {
        width: 100%;
        max-width: 300px;
        padding: 12px 18px;
        border-radius: 15px;
    }

    .discord-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

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

    /* Navigation Mobile */
    .navbar {
        position: sticky;
        top: 0;
    }

    .nav-container {
        padding: 12px 15px;
        gap: 15px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 10px 18px;
        letter-spacing: 0.5px;
        border-radius: 12px;
    }

    .nav-user-button {
        padding: 6px 12px;
        gap: 8px;
    }

    .nav-user-avatar {
        width: 30px;
        height: 30px;
    }

    .nav-user-name {
        font-size: 0.85rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 30px 20px;
        margin-top: 40px;
    }

    .footer-logo {
        height: 50px;
    }

    .footer-text {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .footer-links {
        gap: 15px;
        flex-direction: column;
    }

    .footer-link {
        font-size: 0.9rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
        padding: 15px 10px 0;
    }

    /* Action Bar Mobile */
    .action-bar {
        bottom: 20px;
        right: 15px;
        left: 15px;
        min-width: auto;
        max-width: calc(100vw - 30px);
        padding: 15px 18px;
        border-radius: 14px;
    }

    .action-bar-icon {
        font-size: 1.3rem;
    }

    .action-bar-title {
        font-size: 0.9rem;
    }

    .action-bar-message {
        font-size: 0.8rem;
    }

    /* Loading Mobile */
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }

    .loading-text {
        font-size: 1rem;
    }

    .loading-spinner-small {
        width: 25px;
        height: 25px;
        border-width: 2px;
    }

    /* Rank Badge Mobile */
    .rank-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
        border-radius: 6px;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    /* Ultra-compact adjustments */
    .container {
        padding: 25px 15px 50px;
    }

    /* Header Small Mobile */
    .header-section {
        padding: 25px 15px 10px;
    }

    .header-logo {
        height: 70px;
    }

    .discord-button {
        padding: 10px 15px;
        gap: 8px;
        border-radius: 12px;
    }

    .discord-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .discord-label {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    /* Navigation Small Mobile */
    .nav-container {
        padding: 10px 12px;
    }

    .nav-toggle {
        font-size: 1.3rem;
        padding: 8px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 10px 15px;
        border-radius: 10px;
    }

    .nav-user-button {
        padding: 5px 10px;
        border-radius: 30px;
    }

    .nav-user-avatar {
        width: 28px;
        height: 28px;
    }

    .nav-user-name {
        font-size: 0.8rem;
        display: none; /* Hide name on very small screens */
    }

    /* Footer Small Mobile */
    .footer {
        padding: 25px 15px;
        margin-top: 30px;
    }

    .footer-logo {
        height: 45px;
        margin-bottom: 15px;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .footer-links {
        margin-top: 15px;
    }

    .footer-link {
        font-size: 0.85rem;
        padding: 8px;
    }

    .footer-copyright {
        font-size: 0.75rem;
        margin-top: 25px;
        padding-top: 15px;
    }

    /* Action Bar Small Mobile */
    .action-bar {
        bottom: 15px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
        border-radius: 12px;
        gap: 12px;
    }

    .action-bar-icon {
        font-size: 1.2rem;
    }

    .action-bar-title {
        font-size: 0.85rem;
    }

    .action-bar-message {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .action-bar-close {
        padding: 2px 4px;
        font-size: 1rem;
    }

    /* Loading Small Mobile */
    .loading-spinner {
        width: 45px;
        height: 45px;
    }

    .loading-text {
        font-size: 0.95rem;
    }

    /* Rank Badge Small Mobile */
    .rank-badge {
        padding: 4px 8px;
        font-size: 0.65rem;
        letter-spacing: 0.3px;
    }
}

/* Extra Small Phones (iPhone SE, older phones) */
@media (max-width: 375px) {
    .header-logo {
        height: 60px;
    }

    .discord-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 9px 12px;
    }

    .footer-logo {
        height: 40px;
    }

    .action-bar {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .nav-link:hover {
        background: transparent;
        border-color: transparent;
        transform: none;
    }

    .nav-link:active {
        background: rgba(0, 150, 255, 0.2);
        transform: scale(0.98);
    }

    .discord-button:hover {
        transform: none;
    }

    .discord-button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .nav-user-button:hover {
        background: rgba(0, 150, 255, 0.1);
        transform: none;
    }

    .nav-user-button:active {
        transform: scale(0.98);
    }

    .footer-link:hover {
        transform: none;
    }

    .footer-link:active {
        color: var(--primary);
        opacity: 0.8;
    }

    /* Increase tap target sizes */
    .nav-link,
    .nav-user-button,
    .discord-button,
    .action-bar-close {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Landscape mode adjustments for phones */
@media (max-height: 500px) and (orientation: landscape) {
    .header-section {
        padding: 20px 30px 10px;
    }

    .header-logo {
        height: 60px;
    }

    .nav-container {
        padding: 10px 20px;
    }

    .container {
        padding: 20px 30px 40px;
    }

    .loading {
        gap: 15px;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar,
    .footer {
        border-width: 3px;
    }

    .nav-link {
        border-width: 3px;
    }

    .rank-badge {
        border-width: 2px;
    }

    .action-bar {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }

    .loading-spinner,
    .loading-spinner-small {
        animation: none;
        border-top-color: var(--primary);
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can add specific adjustments here */
    .action-bar {
        background: linear-gradient(135deg, rgba(13, 31, 45, 1) 0%, rgba(26, 58, 82, 1) 100%);
    }
}

/* Print styles */
@media print {
    body::before,
    html::before {
        display: none;
    }

    .navbar,
    .footer,
    .action-bar {
        display: none;
    }

    .header-section {
        background: none;
        padding: 20px;
    }

    .container {
        padding: 20px;
    }

    * {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
    }
}