:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --accent-pink: #ff8fa3; /* Cat nose pink */
    --accent-hover: #ffc2d1;
    --border-color: #333;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    height: 100%;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--accent-pink);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Upload Zone */
.upload-zone {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-color);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent-pink);
    background: #251a1d;
}

.upload-content {
    text-align: center;
    pointer-events: none;
}

.upload-content .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Reader Display */
.reader-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 200px;
}

.hidden {
    display: none !important;
}

.rsvp-display {
    width: 100%;
    position: relative;
    font-size: 4rem; /* Big text */
    font-family: var(--font-mono); /* Monospace helps slightly but we use dynamic alignment */
    line-height: 1;
    user-select: none;
}

/* The Guides (Whiskers style) */
.guide-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 120px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    pointer-events: none;
    z-index: 0;
}

.focal-marker {
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: 50%;
    width: 2px;
    background: transparent; /* Could be a vertical line, but user asked for pink character focus */
    /* Let's add a subtle vertical tick at top and bottom */
}

/* Alignment Magic */
.word-display {
    display: flex;
    align-items: baseline; /* Align text on baseline */
    width: 100%;
    position: relative;
    z-index: 1;
}

#word-left {
    flex: 1;
    text-align: right;
    white-space: pre; /* Keep spaces */
}

#word-center {
    color: var(--accent-pink);
    font-weight: bold;
    /* We don't set width, it takes the width of the char */
    transform: translateY(-1px); /* Optical adjustment */
}

#word-right {
    flex: 1;
    text-align: left;
    white-space: pre;
}

/* Controls */
.controls {
    width: 100%;
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: auto; /* Push to bottom */
    transition: opacity 0.3s;
}

.controls.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.progress-container {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input[type=range] {
    width: 100%;
    accent-color: var(--accent-pink);
    cursor: pointer;
}

.time-read {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.control-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.control-btn.big {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    background: rgba(255, 143, 163, 0.1);
    border-color: var(--accent-pink);
}

.control-btn.big:hover {
    background: var(--accent-pink);
    color: #000;
}

.wpm-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wpm-control input {
    background: #000;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    width: 70px;
    border-radius: 4px;
    text-align: center;
}

.status-msg {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-height: 1.2em;
}
