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

html, body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==================== SCROLLBAR STYLES ==================== */
/* Mobile: Show thin scrollbars for testing */
@media (max-width: 768px) {
    * {
        scrollbar-width: thin;
        scrollbar-color: #475569 rgba(30, 41, 59, 0.5);
    }
    
    *::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    *::-webkit-scrollbar-track {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 2px;
    }
    
    *::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 2px;
    }
    
    body {
        height: 100vh;
        overflow-y: auto; /* Allow scrolling */
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
}

/* PC: Show styled scrollbars */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
}

.login-card {
    background: rgba(30, 41, 59, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid #475569;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.login-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-icon i {
    font-size: 3rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 1.5rem;
    border-radius: 50%;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: #f1f5f9;
}

.login-description {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 500;
}

.form-group label i {
    color: #64748b;
}

.form-group input {
    width: 100%;
    padding: 16px;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid #475569;
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder {
    color: #64748b;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    border-radius: 8px;
}

.toggle-password:hover {
    background: rgba(30, 41, 59, 0.5);
    color: #3b82f6;
}

.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #475569;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #10b981;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hint {
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    font-style: italic;
}

/* ==================== STATUS INDICATORS - COMMON ==================== */
.status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 90px;
    max-width: 90px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.status.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.checking {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-icon {
    font-size: 0.55rem;
}

/* PC version status - mobile နဲ့တူတဲ့ design */
@media (min-width: 769px) {
    .status {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
        min-width: 110px;
        max-width: 110px;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .status:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .status.online {
        background: rgba(16, 185, 129, 0.2);
        color: #10b981;
        border: 1px solid rgba(16, 185, 129, 0.4);
    }
    
    .status.offline {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.4);
    }
    
    .status.checking {
        background: rgba(245, 158, 11, 0.2);
        color: #f59e0b;
        border: 1px solid rgba(245, 158, 11, 0.4);
    }
    
    .status-icon {
        font-size: 0.6rem;
        position: relative;
        top: -1px;
    }
}

/* ==================== DASHBOARD - MOBILE ==================== */
@media (max-width: 768px) {
    /* Body - ALLOW scrolling */
    body {
        height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* Header - fixed */
    .dashboard-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #334155;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        padding: 12px 16px;
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    .header-left h1 {
        font-size: 1.3rem;
        font-weight: 700;
        background: linear-gradient(90deg, #60a5fa, #3b82f6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .date-display {
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 4px;
        display: none;
    }

    .header-right {
        display: none;
    }

    /* Search and Actions */
    .header-bottom {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .search-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .search-input-wrapper {
        position: relative;
        background: rgba(15, 23, 42, 0.7);
        border: 1px solid #475569;
        border-radius: 10px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    .search-input-wrapper i {
        color: #94a3b8;
        font-size: 1rem;
        margin-right: 10px;
        flex-shrink: 0;
    }

    #search {
        flex: 1;
        background: transparent;
        border: none;
        color: #f1f5f9;
        font-size: 0.95rem;
        padding: 12px 0;
        outline: none;
        width: 100%;
        font-family: 'Poppins', sans-serif;
    }

    .header-actions {
        display: flex;
        gap: 10px;
    }

    .btn-check {
        flex: 1;
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        color: white;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        min-height: 44px;
        transition: all 0.3s ease;
        touch-action: manipulation;
    }

    .logout-btn {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.25);
        border-radius: 10px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 16px;
        min-height: 44px;
        transition: all 0.3s ease;
        font-size: 0.9rem;
        touch-action: manipulation;
    }

    /* Main Content - ALLOW scrolling */
    main {
        margin-top: 160px; /* Header height */
        margin-bottom: 70px; /* Footer height */
        padding: 16px;
        min-height: calc(100vh - 160px - 70px);
        overflow-y: visible;
    }

    /* Container and Cards - Allow natural flow */
    .container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 20px;
    }

    .card {
        background: rgba(30, 41, 59, 0.8);
        border-radius: 14px;
        border: 1px solid #475569;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }

    .card-header {
        padding: 14px 16px;
        border-bottom: 1px solid #475569;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(15, 23, 42, 0.5);
    }

    .card-header h2 {
        font-size: 1.1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .flag {
        font-size: 1.2rem;
    }

    .server-count {
        font-size: 0.8rem;
        color: #94a3b8;
        background: rgba(30, 41, 59, 0.8);
        padding: 4px 10px;
        border-radius: 12px;
        border: 1px solid #475569;
    }

    /* Server List - No internal scroll */
    .card ul {
        list-style: none;
        max-height: none;
        overflow: visible;
    }

    .card li {
        padding: 12px 16px;
        border-bottom: 1px solid #334155;
        display: flex;
        align-items: center;
        gap: 12px;
        background: rgba(30, 41, 59, 0.6);
        min-height: 68px;
        transition: background 0.2s ease;
        touch-action: pan-y;
    }

    .card li:last-child {
        border-bottom: none;
    }

    .server-number {
        min-width: 40px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        border-radius: 10px;
        font-weight: 700;
        color: white;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .server-info {
        flex: 1;
        min-width: 0;
    }

    .server-name {
        font-weight: 600;
        font-size: 0.95rem;
        color: #e2e8f0;
        margin-bottom: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Buttons with better touch targets */
    .btn-copy, .btn-open {
        padding: 8px 12px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.8rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.2s ease;
        border: none;
        text-decoration: none;
        min-height: 36px;
        min-width: 70px;
        flex-shrink: 0;
        touch-action: manipulation;
    }

    .btn-copy {
        background: rgba(30, 41, 59, 0.8);
        color: #94a3b8;
        border: 1px solid #475569;
    }

    .btn-copy:hover {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

    .btn-open {
        background: linear-gradient(90deg, #10b981, #059669);
        color: white;
    }

    .btn-open:hover {
        background: linear-gradient(90deg, #059669, #047857);
    }

    /* Mobile Stats Bar */
    .mobile-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 16px;
        background: rgba(30, 41, 59, 0.6);
        border-radius: 12px;
        padding: 12px;
        border: 1px solid #475569;
    }

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

    .stat-value {
        font-size: 1.3rem;
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 3px;
    }

    .stat-label {
        font-size: 0.7rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    #onlineServers {
        color: #10b981;
    }

    #offlineServers {
        color: #ef4444;
    }

    #totalServers {
        color: #3b82f6;
    }

    /* Footer - fixed at bottom */
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        border-top: 1px solid #334155;
        padding: 12px 16px;
        z-index: 1000;
    }

    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .footer-left {
        font-size: 0.8rem;
        color: #94a3b8;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    #updateTime {
        color: #f59e0b;
        font-weight: 600;
        font-size: 0.85rem;
    }

    .btn-refresh {
        background: rgba(30, 41, 59, 0.8);
        color: #94a3b8;
        border: 1px solid #475569;
        border-radius: 8px;
        padding: 10px 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s ease;
        font-weight: 600;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    /* Notification */
    .notification {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
        background: #10b981;
        color: white;
        padding: 14px 20px;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 10px;
        z-index: 2000;
        opacity: 0;
        transition: all 0.3s ease;
        max-width: 90%;
        font-size: 0.9rem;
    }

    .notification.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    .notification.error {
        background: #ef4444;
    }

    .notification.warning {
        background: #f59e0b;
    }
}

/* ==================== DASHBOARD - PC ==================== */
@media (min-width: 769px) {
    body {
        overflow-y: auto;
    }
    
    /* Header */
    .dashboard-header {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        padding: 1.5rem 2.5rem;
        border-bottom: 1px solid #334155;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .header-left {
        flex: 1;
    }

    .header-left h1 {
        font-size: 2rem;
        font-weight: 700;
        background: linear-gradient(90deg, #60a5fa, #3b82f6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 8px;
    }

    .date-display {
        font-size: 0.9rem;
        color: #94a3b8;
        font-style: italic;
    }

    .header-right {
        margin-left: 2rem;
    }

    .stats-container {
        display: flex;
        gap: 2rem;
        background: rgba(30, 41, 59, 0.6);
        padding: 1rem 1.5rem;
        border-radius: 12px;
        border: 1px solid rgba(71, 85, 105, 0.3);
        backdrop-filter: blur(5px);
        min-width: 300px;
    }

    .stat-item {
        text-align: center;
        flex: 1;
    }

    .stat-value {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 0.8rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Search and Actions */
    .header-bottom {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .search-container {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        flex: 1;
    }

    .search-input-wrapper {
        flex: 1;
        position: relative;
        background: rgba(15, 23, 42, 0.7);
        border: 1px solid #475569;
        border-radius: 12px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        min-height: 52px;
        transition: all 0.3s ease;
    }

    .search-input-wrapper:focus-within {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .search-input-wrapper i {
        color: #94a3b8;
        font-size: 1.1rem;
        margin-right: 12px;
    }

    #search {
        flex: 1;
        background: transparent;
        border: none;
        color: #f1f5f9;
        font-size: 1rem;
        padding: 14px 0;
        outline: none;
        width: 100%;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .btn-check {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0 1.5rem;
        min-height: 52px;
        transition: all 0.3s ease;
    }

    .btn-check:hover {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }

    .logout-btn {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.25);
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 1.5rem;
        min-height: 52px;
        transition: all 0.3s ease;
        font-size: 0.95rem;
    }

    .logout-btn:hover {
        background: #ef4444;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
        border-color: #ef4444;
    }

    /* Main Content */
    main {
        padding: 2rem 2.5rem;
        max-width: 1800px;
        margin: 0 auto;
    }

    /* Container and Cards */
    .container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
        gap: 1.5rem;
    }

    .card {
        background: rgba(30, 41, 59, 0.8);
        border-radius: 16px;
        border: 1px solid #475569;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }

    .card-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid #475569;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(15, 23, 42, 0.5);
    }

    .card-header h2 {
        font-size: 1.4rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .flag {
        font-size: 1.5rem;
    }

    .server-count {
        font-size: 0.9rem;
        color: #94a3b8;
        background: rgba(30, 41, 59, 0.8);
        padding: 6px 12px;
        border-radius: 20px;
        border: 1px solid #475569;
    }

    /* Server List */
    .card ul {
        list-style: none;
        max-height: 500px;
        overflow-y: auto;
    }

    .card li {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #334155;
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: background 0.2s ease;
    }

    .card li:hover {
        background: rgba(30, 41, 59, 0.9);
    }

    .card li:last-child {
        border-bottom: none;
    }

    .server-number {
        min-width: 50px;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        border-radius: 12px;
        font-weight: 700;
        color: white;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .server-info {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .server-name {
        font-weight: 600;
        font-size: 1.1rem;
        color: #e2e8f0;
    }

    /* Actions with mobile-style status */
    .actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    /* Buttons */
    .btn-copy, .btn-open {
        padding: 10px 18px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.3s ease;
        border: none;
        text-decoration: none;
        min-height: 44px;
    }

    .btn-copy {
        background: rgba(30, 41, 59, 0.8);
        color: #94a3b8;
        border: 1px solid #475569;
    }

    .btn-copy:hover {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .btn-open {
        background: linear-gradient(135deg, #10b981, #059669);
        color: white;
    }

    .btn-open:hover {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    /* Summary Card */
    .summary-card .server-number {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed);
        min-width: 120px;
    }

    .summary-card .server-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .progress {
        width: 100%;
        height: 8px;
        background: #334155;
        border-radius: 4px;
        overflow: hidden;
    }

    .progress-bar {
        height: 100%;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        border-radius: 4px;
        transition: width 0.5s ease;
    }

    /* Footer */
    footer {
        background: rgba(15, 23, 42, 0.95);
        border-top: 1px solid #334155;
        padding: 1.5rem 2.5rem;
        margin-top: 2rem;
    }

    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 1800px;
        margin: 0 auto;
    }

    .footer-left {
        font-size: 0.9rem;
        color: #94a3b8;
        display: flex;
        gap: 2rem;
    }

    #updateTime {
        color: #f59e0b;
        font-weight: 600;
        margin-left: 0.5rem;
    }

    .btn-refresh {
        background: rgba(30, 41, 59, 0.8);
        color: #94a3b8;
        border: 1px solid #475569;
        border-radius: 10px;
        padding: 12px 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        font-weight: 600;
        font-size: 0.9rem;
    }

    .btn-refresh:hover {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    /* Notification */
    .notification {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        background: #10b981;
        color: white;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 12px;
        z-index: 2000;
        transform: translateX(100px);
        opacity: 0;
        transition: all 0.3s ease;
        max-width: 400px;
    }

    .notification.show {
        transform: translateX(0);
        opacity: 1;
    }

    /* Hide mobile stats on PC */
    .mobile-stats {
        display: none;
    }
}

/* ==================== COMMON STYLES ==================== */
/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.status.checking .status-icon i {
    animation: pulse 1.5s infinite;
}

/* Loading State */
.btn-check:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #475569;
    margin-bottom: 8px;
}

/* For very large screens */
@media (min-width: 1400px) {
    .container {
        grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    }
    
    .header-left h1 {
        font-size: 2.2rem;
    }
    
    .stats-container {
        min-width: 350px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .status {
        min-width: 120px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* For tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    }
    
    .dashboard-header {
        padding: 1.2rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    footer {
        padding: 1.2rem;
    }
    
    .status {
        min-width: 100px;
        font-size: 0.8rem;
    }
}

/* Landscape mobile adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .dashboard-header {
        position: relative;
        padding: 10px 16px;
    }
    
    main {
        margin-top: 120px;
        margin-bottom: 60px;
        min-height: calc(100vh - 120px - 60px);
    }
    
    .search-container {
        flex-direction: row;
    }
    
    .header-actions {
        flex-direction: row;
    }
}

/* Enhanced Status Colors and Effects */
.status.online .status-icon i {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status.offline .status-icon i {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status.checking .status-icon i {
    color: #f59e0b;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Touch optimizations for mobile */
@media (max-width: 768px) {
    /* Better touch handling */
    .btn-check, .btn-copy, .btn-open, .logout-btn, .btn-refresh, .status {
        touch-action: manipulation;
    }
    
    /* Prevent text selection on interactive elements */
    .btn-check, .btn-copy, .btn-open, .logout-btn, .btn-refresh, .status, .server-name {
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* iOS Safari specific fixes */
    @supports (-webkit-touch-callout: none) {
        body {
            height: -webkit-fill-available;
        }
        
        main {
            min-height: -webkit-fill-available;
        }
    }
    
    /* Android Chrome fixes */
    @media (hover: none) and (pointer: coarse) {
        .card li {
            padding: 14px 16px;
        }
        
        .actions {
            gap: 6px;
        }
        
        .btn-copy, .btn-open {
            padding: 10px 14px;
        }
    }
}