:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --danger-color: #da3633;
    --success-color: #238636;
    --font-family: 'Outfit', sans-serif;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-color), #bc8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-speed);
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.secondary-btn {
    color: var(--text-secondary);
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.secondary-btn:hover {
    color: var(--text-primary);
}

.link-btn {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}

/* Task Input */
#task-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1.1rem;
    text-align: center;
}

#task-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Timer Display */
.timer-display {
    text-align: center;
}

.time-readout {
    font-size: 5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.mode-toggles {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mode-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.mode-btn.active {
    background: var(--accent-color);
    color: white;
}

.controls-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
}

.main-controls {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.spacer {
    grid-column: 3;
}

#reset-btn {
    grid-column: 1;
    justify-self: end;
    margin-right: 15px;
}

.icon-btn {
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.danger-btn {
    background-color: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.danger-btn:hover {
    background-color: var(--danger-color);
    color: white;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding: 0 1rem;
}

/* Stats Section */
.stats-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

list-style: none;
max-height: 200px;
overflow-y: auto;
margin-bottom: 1rem;
margin-top: 0.6rem;
/* Minimalist Scrollbar */
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.export-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recharge-theme {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    /* Vibrant Blue-Green Gradient */
    border: none;
    box-shadow: 0 0 20px rgba(38, 208, 206, 0.5);
    color: white;
}

.recharge-theme h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.recharge-theme p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

#pause-timer-display {
    display: none;
    /* Hide default timer for now, focus on message */
}


input[type="number"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    width: 60px;
    font-size: 1rem;
    text-align: center;
    margin-left: 0.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.time-readout {
    animation: pulse 2s infinite;
}