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

body {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

/* Wizard Steps */
.step {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.step.active {
    display: block;
    opacity: 1;
}

.step-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 400;
}

.step-description {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

/* Form Elements */
label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: #666;
}

select {
    appearance: none;
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row > * {
    flex: 1;
}

/* Dynamic Entry */
.entry-item {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.entry-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    transition: color 0.3s;
}

.entry-item .remove-btn:hover {
    color: #ff4444;
}

.add-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px dashed #333;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 30px;
    transition: border-color 0.3s, color 0.3s;
}

.add-btn:hover {
    border-color: #666;
    color: #aaa;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 12px 32px;
    border: 1px solid #fff;
    background: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s, color 0.3s;
}

.btn:hover {
    background: #fff;
    color: #000;
}

.btn-prev {
    border-color: #444;
    color: #888;
}

.btn-prev:hover {
    background: #444;
    color: #fff;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

/* Result Page */
.result-section {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.result-section:nth-child(1) { animation-delay: 0.2s; }
.result-section:nth-child(2) { animation-delay: 0.6s; }
.result-section:nth-child(3) { animation-delay: 1.0s; }
.result-section:nth-child(4) { animation-delay: 1.4s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

.result-label {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.result-value {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.05em;
}

.result-value.countdown {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #111;
}

.result-item-name {
    color: #ccc;
    font-size: 0.95rem;
}

.result-item-count {
    font-size: 1.3rem;
    font-weight: 200;
    color: #fff;
}

.result-item-unit {
    color: #666;
    font-size: 0.8rem;
    margin-left: 4px;
}

.bankrupt-warning {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}

.time-bar {
    width: 100%;
    height: 24px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    margin: 16px 0;
}

.time-bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.segment-sleep { background: #334; }
.segment-obligation { background: #433; }
.segment-loved { background: #343; }
.segment-people { background: #443; }
.segment-free { background: #222; }

.time-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #888;
}

.time-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* History Page */
.history-item {
    display: block;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #fff;
    transition: border-color 0.3s;
}

.history-item:hover {
    border-color: #444;
}

.history-date {
    color: #666;
    font-size: 0.8rem;
}

.history-summary {
    margin-top: 4px;
    font-size: 0.95rem;
}

.back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #fff;
}

.section-title {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 16px;
    font-weight: 400;
}

/* Goal result styles */
.goal-detail {
    color: #666;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .result-value.countdown {
        font-size: 1.2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
