/* CSS RESET & BASE STYLES */
:root {
    --color-brand: #3B82F6; /* Vibrant Blue (Primary Accent) */
    --color-bg: #F3F4F6; /* Very Light Gray (Main Page Background) */
    --color-dark: #FFFFFF; /* White (Used for app container and cards) */
    --color-text: #0F172A; /* Darker Slate Gray (Main Text Color - for titles/headings) */
    /* KEY CHANGES HERE: These variables are still defined, but we'll use hardcoded black in the selectors below for guaranteed darkness. */
    --color-subtle-text: #111827; /* Near-Black (General Paragraph Text) */
    --color-dark-step-text: #111827; /* Near-Black (Very Dark Text for better visibility in milestones) */
    /* END KEY CHANGES */
    --color-input-bg: #FFFFFF; /* White for inputs */
    --color-input-border: #D1D5DB; /* Light Gray Border (Used for structural lines/borders) */
    --color-secondary-accent: #2563EB; /* Medium Blue (For section headings/important text) */

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent; /* Improves mobile feel */
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Mobile fix */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow-x: hidden;
}

/* MAIN CONTAINER & SCREEN TRANSITIONS */
.app-container {
    width: 100%;
    max-width: 560px; /* Fits mobile and tablet view */
    background-color: var(--color-dark); /* White container */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Lighter shadow */
    border-top: 5px solid var(--color-brand);
    padding: 32px;
    min-height: 400px;
    position: relative;
}

.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    width: calc(100% - 64px); /* Full width minus padding */
}

.screen.active {
    display: block;
    opacity: 1;
    position: relative;
}

/* TYPOGRAPHY */
h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--color-text); } 
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
/* KEY CHANGE: Setting general paragraph text to pure black */
p { color: #000000; } 
.text-subtle { font-size: 0.9rem; color: #4B5563; } /* Label and subtle elements remain dark gray */

/* FORMS & INPUTS */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 400px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .full-width {
        grid-column: span 2;
    }
}

.input-group { margin-bottom: 0.5rem; }
/* Label color made darker for better visibility */
label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 0.25rem; color: #4B5563; }
input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--color-input-bg); /* White input background */
    border: 1px solid var(--color-input-border); 
    color: var(--color-text); /* Dark text input */
    border-radius: 6px;
    transition: border-color 0.2s;
}
input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 1px var(--color-brand);
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem; 
    background-color: var(--color-brand);
    color: white; /* White text on blue button */
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
.btn-primary:hover {
    background-color: #60A5FA; /* Lighter blue on hover */
}
.btn-secondary {
    background-color: var(--color-input-border); /* Light gray button */
    color: var(--color-text); /* Dark text */
    margin-top: 1rem; 
}
.btn-secondary:hover {
    background-color: #D1D5DB;
}

/* LOGO STYLES */
.logo-container {
    text-align: center; 
    margin-bottom: 1.5rem;
}
.logo-img {
    width: 300px; 
    height: auto;
    max-width: 300%;
}
/* QR code styles were removed here */

/* IDEA TILES (Screen 3) */
.tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (min-width: 400px) {
    .tiles-grid {
        grid-template-columns: 1fr 1fr;
    }
    .full-width {
        grid-column: span 2;
    }
}
.tile {
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Reduced opacity of border for light theme */
    border-bottom: 4px solid rgba(0, 0, 0, 0.1); 
}
.tile:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Tile Colors - Adjusted for Light Theme */
.tile-combined { background-color: #10B981; } 
.tile-coupon { background-color: var(--color-brand); } 
.tile-resume { background-color: #EF4444; } 
.tile-quiz { background-color: #8B5CF6; } 
.tile-brighthomes { 
    background-color: #E5E7EB; /* Light gray box for brighthomes */
    border-bottom: 4px solid #D1D5DB; 
}


.tile h3 { font-size: 1.1rem; font-weight: 700; color: white; margin-top: 0.5rem; }
.tile p { font-size: 0.75rem; color: rgba(255, 255, 255, 0.9); }
.tile .icon { font-size: 1.5rem; }

/* Special color overrides for the light brighthomes tile */
.tile-brighthomes h3, .tile-brighthomes .icon { color: var(--color-text); } 
.tile-brighthomes p { color: #000000; } /* KEY CHANGE: Pure black text for bright tile */


/* MODULE PLACEHOLDER (Screen 4) and Personalized Session Block */
.module-details, .personalized-session {
    background-color: var(--color-input-bg); /* White background */
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--color-brand);
}
.personalized-session span {
    color: var(--color-brand);
    font-weight: 700;
}

/* CHAT INTERFACE STYLES (Screen 5) */
.chat-window {
    height: 300px; 
    overflow-y: auto;
    padding: 1rem;
    /* Background color changed from light gray to very light gray for better contrast with dark text */
    background-color: #E5E7EB;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    max-width: 85%;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message {
    background-color: var(--color-dark); /* White bubble */
    color: var(--color-text); 
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background-color: var(--color-brand); 
    color: white; 
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#user-input {
    flex-grow: 1;
    padding: 0.75rem;
    border-radius: 6px;
    background-color: var(--color-dark);
    border: 1px solid var(--color-input-border);
    color: var(--color-text);
}

.send-btn {
    padding: 0.75rem 1rem;
    background-color: #10B981; 
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: #059669; 
}

/* COUPON SPIN WHEEL STYLES (Screen 6) */
.wheel-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 300px;
    height: 300px;
    max-width: 100%;
    max-height: 100vw;
    margin: 2rem auto 0;
}

#the-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-brand) 0 120deg, 
        #EF4444 120deg 240deg, 
        #10B981 240deg 360deg 
    );
    /* Adjusted shadow and border colors for light theme */
    box-shadow: 0 0 0 8px #E5E7EB, 0 0 0 10px var(--color-brand), 0 15px 30px rgba(0, 0, 0, 0.2);
    
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    
    border: 5px solid white;
    cursor: pointer;
    position: relative;
    overflow: hidden; 
}

/* Discount Slices Styling */
.wheel-slice {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform-origin: 0% 0%; 
    width: 50%; 
    height: 50%; 
    transform: rotate(var(--rotation)); 
    background-color: transparent; 
    z-index: 1; 
    display: flex;
    justify-content: center; 
    align-items: flex-start; 
    padding-top: 30px; 
}

.wheel-slice span {
    font-size: 0.8rem; 
    font-weight: 800;
    color: var(--color-text); /* Dark text on wheel slices */
    text-align: center;
    line-height: 1.2;
    transform: rotate(calc(0deg - var(--rotation)));
    padding: 4px 8px; 
    border-radius: 5px;
}

/* The Reveal Overlay */
.reveal-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(243, 244, 246, 0.98); /* Light background overlay */
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-text); /* Dark text */
    z-index: 5; 
    opacity: 1; 
    transition: opacity 0.5s ease;
    padding: 1.5rem;
    transform: rotate(0deg); 
    transition: none; 
}

.reveal-box h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #10B981; 
}
.reveal-box p {
    color: #000000; /* KEY CHANGE: Pure black text for reveal box content */
}

/* Pointer/Indicator at the top */
#wheel-pointer {
    position: absolute;
    top: -20px; 
    bottom: auto; 
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid var(--color-brand); 
    border-bottom: 0; 
    z-index: 10;
}

.coupon-code {
    font-family: monospace;
    font-size: 2.5rem;
    font-weight: 900;
    padding: 0.5rem 1rem;
    color: var(--color-brand); 
    background-color: var(--color-input-border); /* Light gray background */
    border: 2px dashed var(--color-brand); 
    border-radius: 6px;
    margin: 1rem auto;
    letter-spacing: 3px;
    display: inline-block;
}

/* CAREER PATH GENERATOR STYLES (Screen 7) */
.career-path-results {
    position: relative;
    padding: 1rem;
    background-color: var(--color-dark); /* White background */
    border-radius: 8px;
    margin-top: 1rem;
    min-height: 350px;
}

.result-section {
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-brand); 
    padding-left: 1rem;
}

.result-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-secondary-accent); /* Medium blue for section title */
}

.skill-list {
    list-style: none;
    padding-left: 0;
}

.skill-list li {
    font-size: 0.9rem;
    color: #000000; /* KEY CHANGE: Pure black text for skill list items */
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.3rem;
}

.skill-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #10B981; /* Green */
    font-weight: bold;
}

/* Milestone styles for Screen 7 results */
.milestones-container {
    padding: 0.5rem 0;
}

.milestone-step {
    /* Vertical line made dark for visibility */
    border-left: 2px solid var(--color-text); 
    padding-left: 1rem;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
}

.milestone-step:last-child {
    border-left: none; /* No line after the last step */
}

.milestone-step p { 
    /* KEY CHANGE: Setting milestone step description text to pure black for maximum visibility */
    color: #000000; 
}


/* Coupon box styling for Screen 7 */
.coupon-box {
    border-left: 3px solid #8B5CF6; 
    background-color: #F3E8FF; /* Very light purple background */
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1.5rem; 
    padding-left: 1rem; 
    margin-left: 0;
}

.coupon-box h3 {
    color: #8B5CF6; /* Purple for coupon heading */
}

.coupon-code-small {
    font-family: monospace;
    font-size: 2rem; 
    font-weight: 900;
    color: var(--color-brand); 
    letter-spacing: 1px;
}

/* Loading Spinner */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(243, 244, 246, 0.95); /* Light background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    color: var(--color-text);
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    border: 5px solid var(--color-input-border); 
    border-top: 5px solid var(--color-brand); 
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESUME ANALYZER STYLES (Screen 8) */
.upload-label {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0; 
    margin-bottom: 0.5rem; 
    cursor: pointer;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* Initial state color fill adjusted */
    background: conic-gradient(#10B981 0%, #10B981 0%, #E5E7EB 0%); 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.score-circle span {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-brand); 
    text-shadow: none;
    background-color: var(--color-dark); /* White background inside circle */
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}