:root {
    --primary-color: #2563eb;
    --secondary-color: #4f46e5;
    --success-color: #16a34a;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.page-wrapper {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.auth-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.login-btn {
    background-color: var(--primary-color);
    color: white;
}

.login-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.register-btn {
    background-color: var(--success-color);
    color: white;
}

.register-btn:hover {
    background-color: #15803d;
    transform: translateY(-2px);
}

.admin-btn {
    background-color: #6b7280;
    color: white;
}

.admin-btn:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

.upload-container {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.upload-area {
    background-color: white;
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.login-prompt {
    background-color: white;
    border: 2px dashed #fbbf24;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.login-prompt:hover {
    border-color: #f59e0b;
}

.login-prompt .upload-icon i {
    color: #f59e0b;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

.upload-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.upload-button:hover {
    background-color: var(--secondary-color);
}

.supported-formats {
    color: #64748b;
    font-size: 0.875rem;
}

.results-container {
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    margin-top: 2rem;
    overflow: hidden;
}

.results-content {
    padding: 2rem;
}

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analysis-card {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.analysis-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    color: #475569;
}

.action-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.action-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.action-button.primary {
    background-color: var(--primary-color);
    color: white;
}

.action-button.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.action-button.success {
    background-color: var(--success-color);
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.score-section {
    text-align: center;
    margin: 3rem 0;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.score-info {
    max-width: 400px;
    color: #64748b;
}

.improvements-section {
    margin-top: 2rem;
    text-align: left;
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.improvements-section h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.improvements-list {
    list-style-type: none;
    padding: 0;
    margin: 1rem 0;
}

.improvements-list li {
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.improvements-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.improvements-list li i {
    color: var(--success-color);
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.recommendations-section {
    margin-top: 3rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.loader-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

/* Logout Button Styling */
.logout-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

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

.logout-btn:hover {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.logout-btn:hover::before {
    left: 100%;
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.logout-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.logout-btn:hover i {
    transform: rotate(15deg);
}

/* Username Display Styling */
.username-display {
    color: #64748b;
    font-weight: 500;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
    transition: all 0.3s ease;
}

.username-display:hover {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
}

/* Responsive adjustments for logout button */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

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

    .upload-area {
        padding: 2rem 1rem;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .action-section {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
        justify-content: center;
    }

    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }

    .improvements-section {
        padding: 1rem;
    }

    .improvements-list li {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .logout-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .username-display {
        margin-right: 0.75rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}