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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Welcome Screen */
.welcome-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.welcome-card {
    background: white;
    border-radius: 24px;
    padding: 48px 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

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

.seedling-icon {
    text-align: center;
    font-size: 64px;
    margin-bottom: 24px;
    animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.welcome-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: #1F2937;
    margin-bottom: 12px;
}

.welcome-subtitle {
    text-align: center;
    color: #6B7280;
    margin-bottom: 32px;
    font-size: 16px;
}

.welcome-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.currency-input {
    display: flex;
    gap: 8px;
}

.currency-select {
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    min-width: 70px;
}

.currency-symbol {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #F3F4F6;
    border-radius: 12px;
    font-weight: 600;
    color: #6B7280;
}

.btn-primary {
    background: #10B981;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: #059669;
    transform: scale(1.02);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 18px 32px;
    font-size: 18px;
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

/* Dashboard */
.dashboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dashboard-greeting {
    font-size: 24px;
    font-weight: bold;
    color: #1F2937;
}

.settings-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.settings-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Progress Card */
.progress-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-bar-container {
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-amount {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

.progress-percent {
    font-size: 14px;
    color: #6B7280;
}

.days-badge {
    text-align: center;
    padding: 8px 16px;
    background: #D1FAE5;
    color: #047857;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Tree Section */
.tree-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 32px;
}

.tree-container {
    transition: all 0.5s ease-in-out;
}

.tree-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.2));
    animation: gentleFloat 4s ease-in-out infinite;
}

.main-tree .tree-svg {
    max-width: 400px;
    max-height: 400px;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Streak Card */
.streak-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.streak-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.streak-emoji {
    font-size: 32px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.streak-number {
    font-size: 48px;
    font-weight: bold;
    color: #F97316;
}

.streak-label {
    font-size: 18px;
    color: #6B7280;
    font-weight: 600;
}

.streak-best {
    color: #8B5CF6;
    font-weight: 600;
    font-size: 14px;
}

.streak-status {
    color: #6B7280;
    font-size: 14px;
    text-align: center;
}

/* Action Button */
.action-button {
    width: 100%;
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); }
}

/* Recent Wins */
.recent-wins {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #1F2937;
    margin-bottom: 16px;
}

.wins-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.win-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
    transition: background 0.2s;
}

.win-item:hover {
    background: #F3F4F6;
}

.win-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.win-icon {
    width: 24px;
    height: 24px;
    background: #10B981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.win-description {
    font-weight: 500;
    color: #1F2937;
    flex: 1;
}

.win-date {
    color: #9CA3AF;
    font-size: 13px;
}

.win-amount {
    font-weight: 600;
    color: #10B981;
    font-size: 16px;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: bold;
    color: #1F2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.modal-buttons button {
    flex: 1;
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #10B981;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    z-index: 2000;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.toast-icon {
    width: 24px;
    height: 24px;
    background: white;
    color: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 9999;
    top: -10px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: #6B7280;
    font-size: 14px;
}

.footer a {
    color: #10B981;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-small {
    margin-top: 8px;
    font-size: 12px;
    color: #9CA3AF;
}

/* Responsive */
@media (max-width: 640px) {
    .dashboard {
        padding: 16px;
    }
    
    .welcome-card {
        padding: 32px 24px;
    }
    
    .dashboard-greeting {
        font-size: 20px;
    }
    
    .tree-section {
        min-height: 250px;
        padding: 16px;
    }
    
    .main-tree .tree-svg {
        max-width: 300px;
        max-height: 300px;
    }
    
    .streak-number {
        font-size: 36px;
    }
    
    .modal-content {
        padding: 24px;
    }
}

@media (min-width: 768px) {
    .dashboard {
        padding: 48px 32px;
    }
}