:root {
    --primary-purple: #9b59b6;
    --soft-purple: #f4ecf7;
    --paper-color: #faf9ff;
    --line-color: #e8daef;
    --deep-purple: #4a235a;
    --success-green: #2ecc71;
    --error-red: #e74c3c;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5eef8 0%, #d7bde2 100%);
    font-family: 'Quicksand', sans-serif;
    overflow: hidden;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.2);
    transition: opacity 0.8s;
}

.letter-paper {
    background: var(--paper-color);
    background-image: linear-gradient(var(--line-color) 1px, transparent 1px);
    background-size: 100% 2em;
    width: 85%;
    max-width: 500px;
    height: 80vh;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
}

.letter-paper::-webkit-scrollbar { width: 8px; }
.letter-paper::-webkit-scrollbar-thumb { background: var(--primary-purple); border-radius: 10px; }

.letter-title {
    font-family: 'Dancing Script', cursive;
    color: var(--deep-purple);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.letter-content {
    line-height: 2em;
    color: #444;
    white-space: pre-wrap;
    font-weight: 600;
}

.main-button, .touch-button {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.touch-button { background: var(--deep-purple); animation: pulse 1.5s infinite; }

.q-table { width: 100%; margin-top: 30px; background: white; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.q-table th { padding: 20px; color: var(--deep-purple); }
.btn-cell { padding: 20px; display: flex; justify-content: center; gap: 20px; min-height: 120px; }

.choice-btn { padding: 10px 30px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.yes { background: var(--success-green); color: white; z-index: 100; }
.no { background: var(--error-red); color: white; }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.heart { position: absolute; pointer-events: none; animation: floatUp linear forwards; }
@keyframes floatUp { 0% { transform: translateY(100vh); opacity: 1; } 100% { transform: translateY(-10vh); opacity: 0; } }
.hidden { display: none !important; }
.hidden-fade { opacity: 0; transition: 1.5s; }
.show-fade { opacity: 1; }