:root {
    --outline: #E0E0E0;
    --primary-green: #4CAF50;
    --dark-green: #2E7D32;
    --light-green: #E8F5E9;
    --accent-earth: #795548;
    --text-dark: #212121;
    --text-light: #757575;
    --white: #FFFFFF;
    --background: #F5F5F5;
    --danger: #D32F2F;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-main: "Google Sans Flex", sans-serif;
}

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

body {
    font-family: var(--font-main);
    font-variation-settings: "wdth" 100;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 24px;
    border-bottom-left-radius: 48px;
    border-bottom-right-radius: 48px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-weight: 700;
    font-size: 28px;
}

.byline {
    opacity: 0.75;
    text-align: center;
    font-weight: 400;
    font-size: 12px;
}

.byline a {
    color: var(--white);
}

.bank-display {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(8px);
}

.bank-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: bold;
}

.bank-amount {
    font-variation-settings: "wdth" 125;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.bank-unit {
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 1px;
    font-weight: 600;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-green);
    border: none;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.1s;
}

.btn-secondary:active {
    transform: scale(0.95);
}

main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    margin-top: 64px;
    opacity: 0.75;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 80px;
}

.task-item {
    background-color: var(--white);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 8px solid var(--primary-green);
    transition: transform 0.2s, opacity 0.2s;
}

.task-item.completed {
    background-color: var(--light-green);
    opacity: 0.7;
    text-decoration: line-through;
}

.task-info {
    flex: 1;
    margin-right: 24px;
}

.task-title {
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.task-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-duration {
    background-color: var(--light-green);
    color: var(--dark-green);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
}

.task-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.check-btn {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.check-btn:hover {
    background-color: var(--light-green);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
}

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

.fab-container {
    position: fixed;
    bottom: 36px;
    right: 36px;
    z-index: 20;
}

@media (min-width: 481px) {
    .fab-container {
        position: absolute;
        right: 24px;
        bottom: 24px;
    }
}

.fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
}

.fab:hover {
    transform: scale(1.1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.25s;
}

.overlay.active {
    opacity: 1;
}

.modal {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 24px;
    border-radius: 48px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: all;
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    text-align: center;
}

.modal h2 {
    color: var(--dark-green);
    margin-bottom: 24px;
    font-weight: 500;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--outline);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 24px;
    font-family: var(--font-main);
}

input:focus {
    border-color: var(--primary-green);
    outline: none;
}

.input-error {
    border-color: var(--danger) !important;
}

.field-headline {
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0px;
    opacity: 0.9;
    font-weight: 600;
}

.duration-options {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.duration-btn {
    flex: 1;
    padding: 0;
    border: 1px solid var(--outline);
    background: var(--white);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    color: var(--text-light);
    transition: all 0.2s;
    font-variation-settings: "wdth" 125;
    font-weight: 700;
    font-size: 1.25rem;
}

.duration-btn.active {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

#spend-amount,
#task-input {
    color: var(--text-light);
    background-color: var(--white);
}

#custom-duration {
    width: 96px;
    margin-bottom: 0;
    color: var(--text-light);
    background-color: var(--white);
    text-align: center;
    font-variation-settings: "wdth" 125;
    font-weight: 700;
    font-size: 1.25rem;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 24px;
    font-size: 18px;
    cursor: pointer;
    transition: filter 0.2s;
    font-family: var(--font-main);
    font-variation-settings: "wdth" 100;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn:hover {
    filter: brightness(1.1);
}

.btn:disabled {
    background-color: var(--outline);
    color: #9E9E9E;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

.hidden {
    display: none !important;
}

.modal-body-text {
    margin-bottom: 24px;
}

.btn-earth {
    background-color: var(--accent-earth);
    color: var(--white);
    box-shadow: 0 4px 10px #8D6E6333;
}

@media (prefers-color-scheme: dark) {
    :root {
        --outline: #404040;
        --primary-green: #66BB6A;
        --dark-green: #A5D6A7;
        --light-green: #334033;
        --accent-earth: #8D6E63;
        --text-dark: #E6E6E6;
        --text-light: #B0B0B0;
        --white: #1E1E1E;
        --background: #121212;
        --danger: #EF5350;
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    }
}