:root {
    --primary-blue: #0000FF; /* Pure primary blue */
    --bg-white: #FFFFFF;
    --font-family: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-white);
    color: var(--primary-blue);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Background/Overlay */
#dreamcore-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.1s;
    mix-blend-mode: exclusion; /* Experimental blend mode */
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Header */
header {
    text-align: center;
    position: relative;
    display: flex;
    justify-content: space-between; /* Use flexbox for spacing */
    align-items: center;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    width: 150px; /* Fixed width to center title */
}

.header-right {
    justify-content: flex-end;
    gap: 1rem;
    flex-direction: column; /* Stack language and insta */
    align-items: flex-end;
}

.header-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    flex-grow: 1;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin: 0;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
    padding: 0.5rem; /* Add padding for hover box */
}

/* Hover Effect: Blue Box with White Text */
h1:hover {
    background-color: var(--primary-blue);
    color: var(--bg-white);
    transform: none;
}

/* Header Controls */
.header-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.2s ease;
    line-height: 1;
}

/* Unified hover style for all header controls (Info, Lang, Insta) */
.header-btn:hover {
    background-color: var(--primary-blue);
    color: var(--bg-white);
    transform: none;
}


/* Question Section */
.question-section {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    border-top: 2px solid var(--primary-blue);
    border-bottom: 2px solid var(--primary-blue);
    padding: 2rem 0;
}

#main-question {
    font-size: 2.5rem;
    font-weight: 300;
    white-space: nowrap;
    margin: 0;
    text-align: center;
    /* Static by default */
}

/* Form Section */
.form-section {
    width: 100%;
    margin-top: 2rem; /* Add more space below the question section */
}

form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Increased gap between label and input */
}

label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, textarea {
    border: none;
    border-bottom: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    font-family: var(--font-family);
    font-size: 1.5rem;
    padding: 0.5rem 0 0.8rem 0; /* Increased bottom padding */
    outline: none;
    border-radius: 0; /* Brutalist */
    transition: all 0.3s ease;
}

input::placeholder, textarea::placeholder {
    color: rgba(0, 0, 255, 0.3);
    font-weight: 300;
}

input:focus, textarea:focus {
    padding-left: 1rem;
    background: rgba(0, 0, 255, 0.05);
}

textarea {
    resize: none;
    overflow: hidden; /* Auto-expand implementation or just keeps it clean */
    min-height: 50px;
}

/* Voice Memo Styling */
.voice-memo-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.voice-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.voice-btn {
    margin-top: 0; /* Override general button margin */
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.small-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

#recording-status {
    color: red;
    font-weight: 700;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Checkbox Styling */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 0;
    outline: none;
    cursor: pointer;
    position: relative;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--primary-blue);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--bg-white);
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-label-text {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.9rem;
}


/* Button Styling */
button {
    margin-top: 1rem;
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 1.5rem;
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
}

button:hover {
    background: var(--primary-blue);
    color: var(--bg-white);
}

/* Success Message */
.hidden {
    display: none !important;
}

#thank-you-message {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 2rem;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-white);
    border: 2px solid var(--primary-blue);
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 10px 10px 0px var(--primary-blue);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.modal-text p {
    margin-bottom: 1.5rem;
}

.modal-text p:last-child {
    margin-bottom: 0;
}


/* Mobile adjustments */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    #main-question { font-size: 1.5rem; white-space: normal; }
    .content-wrapper { padding: 1rem; }
    
    header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-left, .header-right {
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    
    .header-right {
        flex-direction: row;
        gap: 2rem;
    }

    /* Responsive tweaks for inputs and buttons */
    input, textarea {
        font-size: 1.2rem;
    }

    button {
        font-size: 1.2rem;
        padding: 1.2rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

/* Instagram Link Styling */
.insta-link {
    text-decoration: none;
    color: var(--primary-blue);
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    display: block;
    margin-top: 1rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.insta-link:hover {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}
