/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-dark: #1a1a1a;
    --text-medium: #666;
    --text-light: #999;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --bg-dark: #2a2a2a;
    --border-dark: #1a1a1a;
    --border-medium: #d0d0d0;
    --border-light: #e8e8e8;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow: hidden;
}

/* Main container */
#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.screen-container {
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow-y: auto;
    padding: 2rem 0;
}

/* Screen transitions */
.screen {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.screen.active {
    opacity: 1;
}

.screen.fade-out {
    opacity: 0;
}

/* Typography */
h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.3;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.question-number {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

p.subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-style: italic;
}

/* Content area fade */
.content-area {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    transition: opacity 0.6s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Buttons */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 2rem auto 0 auto;
    width: 100%;
    max-width: 500px;
}

button {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 1.1rem 2rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-dark);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    position: relative;
    letter-spacing: 0.01em;
}

button.visible {
    opacity: 1;
    transform: translateY(0);
}

button:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    transform: translateX(4px);
}

button:focus {
    outline: 2px solid var(--text-dark);
    outline-offset: 4px;
}

button:active {
    transform: translateX(2px);
}

button.primary {
    background-color: var(--text-dark);
    color: var(--bg-white);
    border-color: var(--text-dark);
}

button.primary:hover {
    background-color: var(--bg-white);
    color: var(--text-dark);
    box-shadow: inset 0 0 0 2px var(--text-dark);
}

button.secondary {
    background-color: transparent;
}

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

button:disabled:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    transform: none;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto 0 auto;
    text-align: left;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.checkbox-group label:hover {
    border-color: var(--border-dark);
}

.checkbox-group label.checked {
    border-color: var(--border-dark);
    background-color: var(--bg-light);
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--text-dark);
    flex-shrink: 0;
}

.checkbox-group .other-input {
    margin-top: 0.25rem;
    width: 100%;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    padding: 0.5rem;
    border: none;
    border-bottom: 1px solid var(--border-medium);
    background: transparent;
    outline: none;
}

.checkbox-group .other-input:focus {
    border-bottom-color: var(--border-dark);
}

/* Textarea */
.text-input-area {
    width: 100%;
    max-width: 500px;
    margin: 1rem auto 0 auto;
}

textarea {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    line-height: 1.6;
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 2px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--border-dark);
}

textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

/* Scale/rating */
.scale-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto 0 auto;
}

.scale-group .scale-option {
    flex: 1;
    padding: 0.8rem 0.5rem;
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
}

.scale-group .scale-option:hover {
    border-color: var(--border-dark);
}

.scale-group .scale-option.selected {
    background-color: var(--text-dark);
    color: var(--bg-white);
    border-color: var(--text-dark);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin: 0.25rem auto 0 auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--text-dark);
    transition: width 0.4s ease;
    z-index: 100;
}

/* Thank you screen */
.thank-you-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.1rem;
    }

    .button-container {
        max-width: 100%;
    }

    button {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }

    .scale-group .scale-option {
        padding: 0.6rem 0.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    p {
        font-size: 1rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .screen {
        transition: none;
    }

    button {
        transition: none;
    }

    .content-area {
        animation: none !important;
        opacity: 1 !important;
    }

    .progress-bar {
        transition: none;
    }
}
