/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    animation: headerSlideDown 0.6s ease-out;
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    align-items: center;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    font-size: 0.95rem;
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    color: #ffd700;
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.25);
    color: #ffd700;
    border-color: rgba(255,215,0,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 5px;
    top: 100%;
    left: 0;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.server-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    min-width: 150px;
}

.server-status {
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.server-status.connected {
    color: #28a745;
}

.server-status.disconnected {
    color: #dc3545;
}

.server-status.slow {
    color: #ffc107;
}

.server-status.detecting {
    color: #17a2b8;
    animation: pulse 1.5s infinite;
}

.server-location {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.auth-btn:hover {
    background: white;
    color: #1e3c72;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
    animation: contentFadeIn 0.8s ease-out;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Container */
.page-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.page-title {
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 30px;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,60,114,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
        min-height: auto;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .server-info {
        align-items: center;
        text-align: center;
        min-width: auto;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 20px 15px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.hidden { display: none; }
.visible { display: block; }

/* Accuracy Rating Styles */
.accuracy-info {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.accuracy-rating {
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.accuracy-rating.excellent {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.accuracy-rating.very-good {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.accuracy-rating.good {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

.accuracy-rating.fair {
    background: linear-gradient(135deg, #fd7e14 0%, #e83e8c 100%);
    color: white;
}

.accuracy-rating.poor {
    background: linear-gradient(135deg, #dc3545 0%, #6f42c1 100%);
    color: white;
}

.accuracy-details {
    margin-top: 10px;
    font-size: 0.85rem;
}

.accuracy-score {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.accuracy-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reason {
    color: #6c757d;
    font-size: 0.8rem;
    padding-left: 8px;
} 