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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f0eb;
    color: #2c2c2c;
    min-height: 100vh;
}

header {
    background: #4a7c59;
    color: white;
    padding: 16px 20px;
    text-align: center;
}

header h1 { font-size: 1.4rem; font-weight: 700; }
header p { font-size: 0.85rem; opacity: 0.85; margin-top: 4px; }

.tabs {
    display: flex;
    background: #3d6b4a;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: white;
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

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

.tab-content { display: none; }
.tab-content.active { display: block; }

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 { font-size: 1.1rem; color: #4a7c59; margin-bottom: 16px; }

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    margin-top: 14px;
}

label:first-of-type { margin-top: 0; }

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fafafa;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4a7c59;
    background: white;
}

.btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: #4a7c59;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 18px;
    transition: background 0.2s;
}

.btn:hover { background: #3d6b4a; }
.btn:disabled { background: #aaa; cursor: not-allowed; }

.result-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: none;
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 0.95rem;
}

.result-box h3 { color: #4a7c59; margin-bottom: 12px; }

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.btn-small {
    flex: 1;
    padding: 9px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-copy { background: #e8f0ea; color: #4a7c59; }
.btn-copy:hover { background: #d4e6d9; }

.loading {
    text-align: center;
    padding: 30px;
    color: #888;
    display: none;
}

.spinner {
    width: 32px; height: 32px;
    border: 3px solid #ddd;
    border-top-color: #4a7c59;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.kofi-box {
    background: #fff8f0;
    border: 1.5px solid #f0c090;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    margin-top: 20px;
}

.kofi-box p { font-size: 0.9rem; color: #666; margin-bottom: 10px; }

.kofi-btn {
    display: inline-block;
    background: #ff5e5b;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.result-content { line-height: 1.8; }
.result-content strong { color: #2c2c2c; }

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: #aaa;
}
