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

/* DARK THEME (default) */
[data-theme="dark"] {
    --bg: #121212;
    --text: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333333;
    --surface: #1e1e1e;
}

/* LIGHT THEME */
[data-theme="light"] {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --border: #cccccc;
    --surface: #ffffff;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Cormorant Garamond', Georgia, serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

body.font-small { font-size: 16px; }
body.font-medium { font-size: 18px; }
body.font-large { font-size: 22px; }
body.font-xlarge { font-size: 26px; }

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    text-align: center;
    padding: 2rem;
    max-width: 650px;
    width: 100%;
}

/* CONTROLS */
.controls {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.control-btn {
    width: 3rem;
    height: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* ENTRY STATE */
.entry {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.choice {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.5s ease, letter-spacing 0.5s ease;
    letter-spacing: 0.02em;
    padding: 1rem 2rem;
    position: relative;
}

.choice:hover {
    color: var(--text);
    letter-spacing: 0.06em;
}

.choice::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--text-muted);
    transition: width 0.5s ease, left 0.5s ease;
}

.choice:hover::after {
    width: 100%;
    left: 0;
}

/* INPUT STATE */
.input-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: fadeIn 1s ease;
}

.input-state.active {
    display: flex;
}

.prompt-text {
    font-size: 1.1em;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
}

textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2em;
    font-weight: 300;
    width: 100%;
    max-width: 400px;
    min-height: 100px;
    resize: none;
    text-align: center;
    padding: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: var(--text-muted);
}

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

.submit-thought {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1em;
    font-weight: 300;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    letter-spacing: 0.1em;
}

.submit-thought:hover {
    color: var(--text);
}

/* REFLECTION STATE */
.reflection-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    animation: fadeIn 1s ease;
}

.reflection-state.active {
    display: flex;
}

.the-thought {
    font-size: 1.4em;
    font-weight: 300;
    font-style: italic;
    line-height: 1.8;
    max-width: 500px;
    color: var(--text);
    opacity: 0;
    animation: breatheIn 2s ease 0.3s forwards;
}

.reflection-lines {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.reflection-line {
    font-size: 1.1em;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(10px);
}

.reflection-line:nth-child(1) { animation: lineReveal 0.8s ease 1.2s forwards; }
.reflection-line:nth-child(2) { animation: lineReveal 0.8s ease 1.8s forwards; }
.reflection-line:nth-child(3) { animation: lineReveal 0.8s ease 2.4s forwards; }
.reflection-line:nth-child(4) { animation: lineReveal 0.8s ease 3s forwards; }

.post-reflection {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease 3.5s forwards;
}

.post-option {
    font-size: 1em;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.post-option:hover {
    color: var(--text);
}

/* FOOTER */
.footer {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.footer-link:hover {
    color: var(--text);
}

/* PAGE STATE */
.page-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: fadeIn 0.8s ease;
    max-width: 600px;
    text-align: left;
}

.page-state.active {
    display: flex;
}

.page-title {
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.page-text {
    font-size: 1em;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
}

.page-text p {
    margin-bottom: 1.25rem;
}

.page-text em {
    color: var(--text);
    font-style: italic;
}

.page-text a {
    color: var(--text);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-text a:hover {
    color: var(--text-muted);
}

.page-text .artist-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9em;
}

.page-text .artist-link:hover {
    color: var(--text);
    text-decoration: underline;
}

.page-close {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    margin-top: 1rem;
    letter-spacing: 0.1em;
    text-align: center;
    width: 100%;
}

.page-close:hover {
    color: var(--text);
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes breatheIn {
    from { 
        opacity: 0; 
        transform: scale(0.98);
    }
    to { 
        opacity: 1; 
        transform: scale(1);
    }
}

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

.hidden {
    display: none !important;
}

/* Mobile */
@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controls {
        bottom: 5rem;
        right: 1rem;
    }
    
    .control-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
}

