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

:root {
    --primary-orange: #FF6B35;
    --dark-brown: #5C4033;
    --light-cream: #F5E6D3;
    --medium-brown: #8B7355;
    --accent-yellow: #FFD93D;
    --accent-green: #6BCF7F;
    --accent-blue: #4A90E2;
    --student-bg: #FFF8E7;
    --teacher-bg: #E8F5E9;
    --white: #FFFFFF;
    --shadow: rgba(92, 64, 51, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 50%, #87CEEB 100%);
    position: relative;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.logo-icon {
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: rotate(5deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-brown);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.7rem;
    color: var(--medium-brown);
    font-weight: 400;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--accent-blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-brown);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid var(--light-cream);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 2px 8px var(--shadow);
}

.language-selector select {
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--dark-brown);
    cursor: pointer;
    outline: none;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 2px solid var(--dark-brown);
    color: var(--dark-brown);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--dark-brown);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 64, 51, 0.3);
}

.btn-logout:active {
    transform: translateY(0) scale(0.98);
}

/* Progress Indicator */
.progress-container {
    max-width: 600px;
    margin: 2rem auto 1rem;
    padding: 0 2rem;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--light-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--medium-brown);
    transition: all 0.3s ease;
}

.step.completed .step-circle {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.step.active .step-circle {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.step span {
    font-size: 0.8rem;
    color: var(--dark-brown);
    font-weight: 600;
}

.step-line {
    width: 80px;
    height: 3px;
    background: var(--light-cream);
    margin: 0 0.5rem;
}

.step-line.completed {
    background: var(--accent-green);
}

.progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--medium-brown);
    font-weight: 600;
}

/* Scenic Background */
.scenic-background {
    position: relative;
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background:
        linear-gradient(to bottom, transparent 60%, rgba(139, 115, 85, 0.2) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="sky" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%2387CEEB"/><stop offset="100%" style="stop-color:%23E0F6FF"/></linearGradient></defs><rect fill="url(%23sky)" width="1200" height="800"/><path fill="%23A0826D" d="M0 600 Q300 500 600 550 T1200 600 V800 H0 Z"/><ellipse cx="600" cy="400" rx="300" ry="150" fill="%2387CEEB" opacity="0.6"/><polygon points="400,350 500,150 600,350" fill="%23708090" opacity="0.8"/><polygon points="700,300 850,100 1000,300" fill="%23556B7D" opacity="0.8"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Left Decorations */
.left-decorations {
    position: absolute;
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInLeft 1s ease;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateY(-50%) translateX(-30px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.wooden-sign {
    width: 120px;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #D2691E 0%, #A0522D 100%);
    border-radius: 12px;
    border: 4px solid var(--dark-brown);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
    transform: rotate(-3deg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wooden-sign:hover {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.4);
}

.sign-text {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light-cream);
    text-align: center;
    line-height: 1.4;
}

.book-stack-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 1rem;
}

.book-spine {
    width: 100px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-spine:hover {
    transform: translateX(10px) scale(1.05);
}

.book-spine.learn {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
}

.book-spine.grow {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
}

.book-spine.achieve {
    background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
}

/* Right Decorations */
.right-decorations {
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-end;
    animation: fadeInRight 1s ease;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateY(-50%) translateX(30px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.chalkboard {
    width: 140px;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%);
    border-radius: 8px;
    border: 6px solid #8B4513;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    transform: rotate(2deg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.chalkboard:hover {
    transform: rotate(2deg) scale(1.05);
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.5);
}

.chalk-text {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.4;
}

.book-stack-right {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-right: 1rem;
}

.book-spine-h {
    width: 90px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-spine-h:hover {
    transform: translateX(-10px) scale(1.05);
}

.book-spine-h.math {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
}

.book-spine-h.science {
    background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);
}

.book-spine-h.english {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
}

.book-spine-h.success {
    background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
}

.coffee-mug {
    width: 70px;
    height: 80px;
    position: relative;
    animation: steamRise 3s ease-in-out infinite;
}

@keyframes steamRise {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.mug-body {
    font-size: 3.5rem;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.3));
    cursor: pointer;
    transition: all 0.3s ease;
}

.mug-body:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* Content Card */
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 4px solid var(--light-cream);
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 10;
}

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

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

.welcome-header h1 {
    font-size: 1.5rem;
    color: var(--dark-brown);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-header h2 {
    font-size: 2.5rem;
    color: var(--dark-brown);
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: 'Caveat', cursive;
    letter-spacing: -1px;
}

.motto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-family: 'Caveat', cursive;
}

.bullet {
    color: var(--dark-brown);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--medium-brown);
    line-height: 1.6;
}

/* Role Cards */
.role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.role-card {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.student-card {
    background: var(--student-bg);
    border-color: #F4E4C1;
}

.teacher-card {
    background: var(--teacher-bg);
    border-color: #C8E6C9;
}

.role-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.role-card:hover .hover-details {
    opacity: 1;
    max-height: 100px;
    margin-top: 1rem;
}

.role-card.selected {
    border-color: var(--primary-orange);
    border-width: 4px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transform: scale(1.05);
}

.student-card.selected {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFE4B5 100%);
}

.teacher-card.selected {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

/* Avatar Illustrations */
.card-illustration {
    margin-bottom: 1rem;
    position: relative;
}

.avatar {
    width: 80px;
    height: 100px;
    position: relative;
    margin: 0 auto;
}

.avatar-head {
    width: 40px;
    height: 40px;
    background: #FFD8B2;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid var(--dark-brown);
}

.avatar-head::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10px;
    width: 6px;
    height: 6px;
    background: var(--dark-brown);
    border-radius: 50%;
}

.avatar-head::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--dark-brown);
    border-radius: 50%;
}

.student-avatar .avatar-body {
    width: 50px;
    height: 55px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 8px 8px 15px 15px;
    border: 3px solid var(--dark-brown);
}

.teacher-avatar .avatar-body {
    width: 50px;
    height: 55px;
    background: linear-gradient(135deg, #6BCF7F 0%, #4CAF50 100%);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 8px 8px 15px 15px;
    border: 3px solid var(--dark-brown);
}

.book-icon, .board-icon {
    position: absolute;
    right: -10px;
    bottom: 10px;
    font-size: 1.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.role-card h3 {
    font-size: 1.4rem;
    color: var(--dark-brown);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.role-card p {
    font-size: 0.9rem;
    color: var(--medium-brown);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.hover-details {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    font-size: 0.85rem;
    color: var(--dark-brown);
    line-height: 1.8;
    font-weight: 600;
}

/* Radio Button */
.role-card input[type="radio"] {
    display: none;
}

.radio-label {
    width: 30px;
    height: 30px;
    border: 3px solid var(--medium-brown);
    border-radius: 50%;
    display: block;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-card input[type="radio"]:checked + .radio-label {
    border-color: var(--primary-orange);
    background: var(--primary-orange);
}

.role-card input[type="radio"]:checked + .radio-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-previous {
    background: white;
    border: 3px solid var(--light-cream);
    color: var(--dark-brown);
}

.btn-previous:hover {
    background: var(--light-cream);
    transform: translateX(-5px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-proceed {
    background: var(--dark-brown);
    color: white;
    box-shadow: 0 4px 15px rgba(92, 64, 51, 0.3);
}

.btn-proceed:hover:not(:disabled) {
    background: var(--primary-orange);
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-proceed:disabled {
    background: var(--light-cream);
    color: var(--medium-brown);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-nav:active:not(:disabled) {
    transform: scale(0.98);
}

.journey-text {
    text-align: center;
    font-size: 0.95rem;
    color: var(--medium-brown);
    font-weight: 600;
    font-family: 'Caveat', cursive;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--dark-brown);
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 70px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.15);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* A tab for the role you are already signed in as. See nav.js. */
.nav-item-hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .left-decorations,
    .right-decorations {
        display: none;
    }

    .content-card {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
    }

    .brand-name {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.6rem;
    }

    .verified-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .btn-logout {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .progress-container {
        padding: 0 1rem;
    }

    .step-line {
        width: 40px;
    }

    .step span {
        font-size: 0.7rem;
    }

    .content-card {
        padding: 2rem 1.5rem;
    }

    .welcome-header h2 {
        font-size: 2rem;
    }

    .role-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .scenic-background {
        padding: 1rem;
        min-height: calc(100vh - 180px);
    }
}

@media (max-width: 480px) {
    .welcome-header h1 {
        font-size: 1.2rem;
    }

    .welcome-header h2 {
        font-size: 1.75rem;
    }

    .motto {
        font-size: 1rem;
    }

    .content-card {
        padding: 1.5rem 1rem;
    }

    .role-card {
        padding: 1.5rem 1rem;
    }

    .nav-item {
        min-width: 60px;
        padding: 0.4rem 0.5rem;
    }

    .nav-item svg {
        width: 20px;
        height: 20px;
    }

    .nav-item span {
        font-size: 0.7rem;
    }
}
