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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    min-height: 100vh;
    padding: 20px;
    color: #92400e;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, #1e3a8a, #f97316) bottom / 100% 2px no-repeat;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.header-bottom {
    display: flex;
    justify-content: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-logout-btn {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #1e3a8a;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.header-logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.5);
}

.header-welcome {
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-inline-btn {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
    margin-left: 8px;
}

.logout-inline-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.5);
}

h1 {
    background: linear-gradient(135deg, #1e3a8a 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.subtitle {
    color: #b45309;
    font-size: 0.95rem;
    font-weight: 500;
}

h2 {
    background: linear-gradient(135deg, #1e3a8a 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-size: 1.8rem;
    font-weight: 700;
}

h3 {
    color: #ea580c;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Auth Container - Centered */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.auth-card {
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.15);
}

.auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding: 6px;
    background: rgba(30, 58, 138, 0.08);
    border-radius: 14px;
}

.auth-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form h2 {
    margin-bottom: 10px;
    text-align: center;
}

.auth-form input {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #1e3a8a;
}

.auth-form input::placeholder {
    color: #1e3a8a;
    opacity: 0.6;
}

.auth-form input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.auth-form button,
button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #1e3a8a;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: linear-gradient(135deg, #a8b2d1 0%, #8b95b5 100%);
    padding: 12px 24px;
    font-size: 0.95rem;
}

.secondary-btn:hover {
    box-shadow: 0 8px 25px rgba(168, 178, 209, 0.6);
}

.error {
    color: #f5576c;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
}

.success-message {
    color: #48bb78;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
}

/* Navigation */
.nav-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #92400e;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(30, 58, 138, 0.1);
    color: #92400e;
}

.nav-link.active {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* Standalone Header for Questions Page */
.standalone-header {
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* Welcome Section */
.user-welcome {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(249, 115, 22, 0.05));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.welcome-text p {
    color: #92400e;
    font-size: 1.05rem;
}

.welcome-text span {
    color: #f97316;
    font-weight: 700;
}

/* Generator Card */
.generator-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.1);
}

.card-header {
    margin-bottom: 30px;
}

.card-header h2 {
    margin-bottom: 8px;
}

.card-header p {
    color: #92400e;
    font-size: 0.95rem;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-full {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label,
.form-row-full label {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 0.95rem;
}

.form-row-full small {
    color: #92400e;
    font-size: 0.85rem;
}

.form-group select,
.form-group input,
.form-row-full input,
.form-row-full textarea {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #1e3a8a;
}

.form-group input::placeholder,
.form-row-full input::placeholder,
.form-row-full textarea::placeholder {
    color: #1e3a8a;
    opacity: 0.6;
}

.form-group select:focus,
.form-group input:focus,
.form-row-full input:focus,
.form-row-full textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.btn-generate {
    margin-top: 10px;
    font-size: 1.1rem;
    padding: 18px 36px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(249, 115, 22, 0.08));
    border-radius: 16px;
    border: 1px solid rgba(30, 58, 138, 0.15);
}

.page-header h2 {
    margin-bottom: 5px;
}

.page-header p {
    color: #92400e;
    font-size: 0.95rem;
}

.page-header strong {
    color: #f97316;
    font-weight: 700;
}

/* Questions Grid */
.questions-grid {
    display: grid;
    gap: 25px;
}

.question-box {
    background: white;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #f97316, #fb923c);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.question-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.2);
}

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

.question-header strong {
    color: #92400e;
    font-size: 1.15rem;
}

.question-meta {
    font-size: 0.85rem;
    color: #f97316;
    font-weight: 600;
    background: rgba(249, 115, 22, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.question-text {
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #92400e;
}

.answer-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f7fafc;
}

.answer-text {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    padding: 18px;
    border-radius: 12px;
    font-weight: 600;
    color: #2f855a;
    margin-top: 15px;
    border-left: 4px solid #48bb78;
}

.answer-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.correct-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.correct-btn:hover {
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.6);
}

.incorrect-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.incorrect-btn:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
}

/* Stats */
.stats-box {
    background: white;
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.1);
}

.stat-item {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(249, 115, 22, 0.05));
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: #92400e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* History Section */
.history-section {
    margin-top: 30px;
}

.history-section h3 {
    margin-bottom: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.history-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a8a;
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #92400e;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-group select:hover {
    border-color: #1e3a8a;
}

.filter-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.history-item {
    background: white;
    border-left: 5px solid #1e3a8a;
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.15);
}

.history-item.correct {
    border-left-color: #48bb78;
}

.history-item.incorrect {
    border-left-color: #f5576c;
}

.history-question {
    font-weight: 600;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 1.05rem;
}

.history-answer {
    color: #2f855a;
    margin-bottom: 12px;
    font-weight: 500;
}

.history-meta {
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(249, 115, 22, 0.05));
    border-radius: 20px;
    border: 2px dashed rgba(30, 58, 138, 0.3);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: #92400e;
    font-size: 1.05rem;
}

.empty-state a {
    color: #92400e;
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #92400e;
    font-weight: 500;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .stats-box {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Landing Page Styles */
.landing-header {
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: none;
    background: none;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-name {
    font-size: 1.8rem;
    margin: 0;
}

.landing-auth-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-link {
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-link {
    color: #1e3a8a;
    background: transparent;
    border: 2px solid #1e3a8a;
}

.login-link:hover {
    background: rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.signup-link {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.signup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
    margin-bottom: 60px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #64748b;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-hero-primary {
    padding: 18px 40px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
    display: inline-block;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.6);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    width: 100%;
    max-width: 250px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.3);
}

/* Features Section */
.features-section {
    padding: 60px 0;
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #1e3a8a, #f97316);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(30, 58, 138, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #1e3a8a;
}

.feature-card p {
    color: #64748b;
    line-height: 1.7;
    font-size: 1rem;
}

/* How It Works Section */
.how-it-works-section {
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(249, 115, 22, 0.05));
    border-radius: 30px;
    margin: 60px -40px;
    padding-left: 80px;
    padding-right: 80px;
    margin-bottom: 60px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1e3a8a;
}

.step-card p {
    color: #64748b;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    text-align: center;
    margin-bottom: 60px;
}

.cta-content {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    padding: 60px;
    border-radius: 30px;
    color: white;
}

.cta-content h2 {
    color: white;
    background: none;
    -webkit-text-fill-color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 35px;
}

.btn-cta {
    padding: 18px 45px;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    display: inline-block;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(249, 115, 22, 0.7);
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 30px 0;
    color: #64748b;
    border-top: 2px solid #e2e8f0;
}

.landing-footer p {
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive Design for Landing Page */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 50px 0;
    }
    
    .hero-image {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .landing-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .how-it-works-section {
        margin-left: -25px;
        margin-right: -25px;
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .cta-content {
        padding: 40px 30px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
}
