/* ========================================
   FOXY AI COACH - STYLESHEET
   ======================================== */

:root {
    --primary-red: #FF2D55;
    --dark-bg: #0A0A0A;
    --dark-secondary: #1A1A1A;
    --dark-tertiary: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --border-color: #333333;
    --transition: all 0.3s ease;
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

#app {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--text-primary);
}

.btn-primary:hover {
    background-color: #FF1744;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 45, 85, 0.3);
}

.btn-secondary {
    background-color: var(--dark-secondary);
    color: var(--text-primary);
    border: 2px solid var(--primary-red);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-discover {
    background-color: var(--primary-red);
    color: var(--text-primary);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(255, 45, 85, 0.5), 0 0 40px rgba(255, 45, 85, 0.3);
    animation: glow 2s ease-in-out infinite;
}

.btn-discover:hover {
    background-color: #FF1744;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 45, 85, 0.7), 0 0 60px rgba(255, 45, 85, 0.5);
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 45, 85, 0.5), 0 0 40px rgba(255, 45, 85, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 45, 85, 0.7), 0 0 60px rgba(255, 45, 85, 0.5);
    }
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   OVERLAY
   ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay-active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    text-align: center;
    animation: slideUp 0.6s ease;
}

.foxy-character {
    width: 200px;
    height: 200px;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

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

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

/* ========================================
   INITIAL WELCOME OVERLAY (FIRST VISIT)
   ======================================== */

.initial-welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.initial-welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.initial-welcome-content {
    text-align: center;
    animation: slideUp 0.6s ease;
}

.foxy-image {
    border-radius: 50%;
    border: 3px solid #ff4d6d;
    object-fit: cover;
    width: 220px;
    height: 220px;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.welcome-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FF2D55);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: slideUp 0.8s ease 0.2s both;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: slideUp 0.8s ease 0.4s both;
}

.welcome-footer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    animation: slideUp 0.8s ease 0.6s both;
}

/* ========================================
   QUIZ CONTAINER
   ======================================== */

.quiz-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    background-color: var(--dark-secondary);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease;
}

.quiz-header {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--dark-tertiary);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    width: 0%;
    transition: width 0.3s ease;
}

#questionCounter {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.quiz-content {
    margin-bottom: 2rem;
}

#questionText {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1rem;
    background-color: var(--dark-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.option:hover {
    background-color: var(--dark-tertiary);
    border-color: var(--primary-red);
    transform: translateX(5px);
}

.option.selected {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--text-primary);
}

.quiz-footer {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

/* ========================================
   LOADING SCREEN
   ======================================== */

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--dark-tertiary);
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

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

/* ========================================
   RESULTS SCREEN
   ======================================== */

.results-screen {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    background-color: var(--dark-secondary);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease;
}

.results-content {
    text-align: center;
}

.archetype-result {
    background-color: var(--dark-tertiary);
    padding: 2rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-red);
}

.archetype-result h3 {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.archetype-result p {
    text-align: left;
    margin: 0;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

#emailInput {
    padding: 0.75rem;
    background-color: var(--dark-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

#emailInput:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 8px rgba(255, 45, 85, 0.3);
}

/* ========================================
   CHAT INTERFACE
   ======================================== */

.chat-interface {
    width: 100%;
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    background-color: var(--dark-secondary);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

.chat-header h2 {
    margin-bottom: 0.5rem;
}

.chat-header p {
    font-size: 0.875rem;
    margin: 0;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    animation: slideUp 0.3s ease;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem;
    border-radius: 0.75rem;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background-color: var(--primary-red);
    color: var(--text-primary);
}

.message.assistant .message-bubble {
    background-color: var(--dark-tertiary);
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-red);
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 1rem;
}

#chatInput {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--dark-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: none;
    transition: var(--transition);
}

#chatInput:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 8px rgba(255, 45, 85, 0.3);
}

/* ========================================
   PAYWALL
   ======================================== */

.paywall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: slideUp 0.6s ease;
}

.paywall h3 {
    margin-bottom: 1rem;
}

.paywall p {
    margin-bottom: 2rem;
}

/* ========================================
   UPSELL BANNER
   ======================================== */

.upsell-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-red);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 16px rgba(255, 45, 85, 0.3);
    animation: slideUp 0.6s ease;
    z-index: 500;
}

.upsell-banner p {
    margin: 0;
    color: var(--text-primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .foxy-character {
        width: 150px;
        height: 150px;
    }

    .quiz-container,
    .results-screen,
    .chat-interface {
        width: 95%;
        max-width: 95%;
        height: auto;
    }

    .chat-interface {
        height: 85vh;
    }

    .message-bubble {
        max-width: 85%;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    .foxy-character {
        width: 120px;
        height: 120px;
    }

    .quiz-container,
    .results-screen {
        padding: 1.5rem;
    }

    .chat-interface {
        height: 90vh;
    }

    .chat-input-area {
        flex-direction: column;
    }

    #chatInput {
        min-height: 60px;
    }

    .message-bubble {
        max-width: 95%;
    }
}
