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

:root {
    --primary-color: #0066cc;
    --secondary-color: #004999;
    --success-color: #28a745;
    --background: #f5f7fa;
    --card-background: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 2rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    text-align: center;
    padding: 2rem 0 1rem;
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.test-banner {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.test-banner-content {
    color: #2c3e50;
}

.test-banner-content strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.test-banner-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
}

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

.btn-link-small {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.25rem 0.5rem;
}

.btn-link-small:hover {
    color: var(--secondary-color);
}

.stats-container {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.points-display {
    margin-bottom: 1.5rem;
}

.current-points {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.goal-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
    width: 0%;
}

.percentage {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.add-point-section {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.add-point-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.recent-activity {
    margin: 1.5rem 0;
}

.recent-activity h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    background: var(--card-background);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.activity-item .description {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.activity-item .meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 1rem;
}

.quote {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.attribution {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--card-background);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.75rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-btn:hover {
    background: var(--border-color);
}

.modal-body {
    padding: 1.5rem;
    line-height: 1.7;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.modal-body h3:first-of-type {
    margin-top: 0.5rem;
}

.modal-body ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin: 0.5rem 0;
}

.modal-body p {
    margin: 0.75rem 0;
}

.quote-box {
    background: var(--background);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.quote-box .quote {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quote-box .attribution {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .current-points {
        font-size: 3rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .add-point-section h2,
    .recent-activity h2 {
        font-size: 1.3rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a1a1a;
        --card-background: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
        --border-color: #444;
        --shadow: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-lg: 0 4px 8px rgba(0,0,0,0.4);
    }

    .form-group input,
    .form-group textarea {
        background: #1a1a1a;
        color: var(--text-primary);
    }

    .progress-bar {
        background: #444;
    }
}
