/* C:\Users\sharif\.gemini\antigravity\scratch\daily-wird\style.css */

:root {
    --primary: #818cf8;
    --primary-glow: rgba(129, 140, 248, 0.4);
    --bg-dark: #0f172a;

    /* Light Theme Tokens */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --header-bg: #f8fafc;
    --border-color: #e2e8f0;
}

/* Sepia Theme */
.theme-sepia {
    --card-bg: #f4ecd8;
    --text-main: #5b4636;
    --header-bg: #eaddc0;
    --border-color: #d3c4a3;
}

/* Dark Reader Theme */
.theme-dark-reader {
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --header-bg: #0f172a;
    --border-color: #334155;
}

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

html,
body {
    width: 100%;
    height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    height: 100%;
    overflow: hidden;
    font-family: 'Outfit', 'Amiri', serif;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

/* Choice Grid */
header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: white;
    text-align: center;
}

header p {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 40px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 90%;
    max-width: 600px;
}

.day-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 10px;
    border-radius: 24px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.day-btn:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

/* The Card UX */
.reader-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 550px;
    height: 85vh;
    max-height: 700px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.reader-header {
    background: var(--header-bg);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.reader-tools {
    display: flex;
    gap: 10px;
}

.tool-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.icon-btn {
    background: var(--border-color);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-main);
}

#current-day-label {
    color: var(--text-main);
    font-weight: 700;
}

.reader-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reader-body {
    flex: 1;
    padding: 30px 40px;
    /* Increased side padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Better for scroll stability */
    text-align: center;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Ensure content is centered if not overflowing */
/* CSS centering removal to fix scroll behavior */

.reader-body::-webkit-scrollbar {
    display: none;
}

.text-display {
    font-family: 'Amiri', serif;
    line-height: 1.8;
    color: var(--text-main);
    width: 100%;
    margin: auto 0;
    /* Keep text centered vertically if possible */
}

.reader-footer {
    height: 110px;
    /* Fixed height for stability */
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
}

.secondary-btn {
    background: var(--border-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    cursor: pointer;
    color: var(--text-main);
}

.secondary-btn:disabled {
    opacity: 0.2;
}

.action-circle-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-circle-btn:after {
    content: '';
    width: 22px;
    height: 22px;
    border: 3px solid white;
    border-radius: 50%;
}

.step-info {
    color: var(--text-main);
    opacity: 0.6;
    font-size: 0.8rem;
    width: 50px;
    text-align: left;
}

@media (max-width: 600px) {
    .reader-card {
        height: 92vh;
        border-radius: 30px;
    }
}