:root {
    --bg-color: #fce4ec; /* Pink Pastel Light */
    --panel-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #888888;
    --primary: #f48fb1; /* Pink Pastel darker */
    --primary-hover: #f06292;
    --error: #ef5350;
    --success: #66bb6a;
    --numpad-bg: #f8bbd0;
    --numpad-hover: #f48fb1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    touch-action: manipulation;
}

.app-shell {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 20px;
}

.panel {
    background-color: var(--panel-bg);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
}

.panel h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: white;
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="password"]:focus {
    border-color: var(--primary);
}

.primary-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-button:active {
    background-color: var(--primary-hover);
}

.error-msg {
    color: var(--error);
    margin-top: 15px;
    font-size: 14px;
}

/* App Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--panel-bg);
}

.stats {
    font-size: 18px;
    font-weight: bold;
    display: flex;
    gap: 15px;
}

.ghost-button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#question-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.question-text {
    font-size: 64px;
    font-weight: bold;
    margin-bottom: 20px;
}

.answer-display {
    font-size: 48px;
    font-weight: bold;
    min-height: 60px;
    color: var(--primary);
}

.flash-green {
    animation: flashGreen var(--flash-duration, 1.2s) ease-out;
}

.flash-red {
    animation: flashRed var(--flash-duration, 1.2s) ease-out;
}

@keyframes flashGreen {
    0%, 99% { background-color: var(--success); }
    100% { background-color: transparent; }
}

@keyframes flashRed {
    0%, 99% { background-color: var(--error); }
    100% { background-color: transparent; }
}

/* Custom Numpad */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
    background-color: var(--panel-bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.num-key {
    background-color: var(--numpad-bg);
    color: white;
    border: none;
    border-radius: 12px;
    height: 70px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.num-key:active {
    background-color: var(--numpad-hover);
    transform: scale(0.95);
}

.action-key {
    background-color: #3a3a3a;
    font-size: 24px;
}

#btn-enter {
    background-color: var(--primary);
    color: #000;
}

#btn-enter:active {
    background-color: var(--primary-hover);
}

/* Dashboard */
#dashboard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-content {
    padding: 20px;
    flex: 1;
}

#dash-summary {
    font-size: 18px;
    line-height: 1.5;
    margin: 20px 0;
    white-space: pre-line;
}

.hero-btn {
    margin-top: 20px;
    padding: 20px;
    font-size: 22px;
}


.danger-button { background-color: var(--error); color: white; padding: 10px 15px; border: none; border-radius: 8px; margin: 5px; cursor: pointer; }
.danger-button:hover { background-color: #d32f2f; }
.admin-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.styled-list { list-style: none; padding: 0; text-align: left; margin-bottom: 20px;}
.styled-list li { display:flex; justify-content: space-between; align-items:center; padding: 10px; background: #fff; border-bottom: 1px solid #eee; margin-bottom: 5px; border-radius: 4px; }
.missed-days-container { margin-top: 30px; text-align: left; }
.missed-days-container ul { list-style: none; padding: 0; }
.missed-days-container li { padding: 10px; background: #ffebee; border-left: 4px solid var(--error); margin-bottom: 5px; border-radius: 4px; }

/* Heatmap */
.heatmap {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    margin-bottom: 20px;
    background: #ccc;
    border: 2px solid #ccc;
}
.heatmap-cell {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #000;
    font-weight: bold;
}
