:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --gold: #d97706;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --info: #3b82f6;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

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

.logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tagline {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

.info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid var(--gold);
    padding: 20px 24px;
    margin: 0;
}

.info-box h2 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #92400e;
}

.info-box p {
    color: #78350f;
    margin-bottom: 12px;
}

.nisab-info {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    color: var(--primary-dark);
    font-size: 15px;
}

.nisab-info small {
    color: var(--text-muted);
    font-size: 13px;
}

.zakat-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.type-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #fed7aa;
    transition: all 0.2s;
}

.type-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.type-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #92400e;
}

.type-card p {
    font-size: 14px;
    color: #78350f;
    margin-bottom: 8px;
    line-height: 1.5;
}

.type-card small {
    font-size: 12px;
    color: #a16207;
    display: block;
    font-style: italic;
}

.requirements {
    list-style: none;
    margin-top: 12px;
}

.requirements li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
}

.requirements li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
    font-size: 16px;
}

.requirements strong {
    color: #92400e;
}

.tabs {
    display: flex;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 120px;
    padding: 16px 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    background: white;
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-content {
    display: none;
    padding: 32px 24px;
}

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

.tab-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.description {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 15px;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    background: var(--bg);
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.btn-calculate {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate:active {
    transform: translateY(0);
}

.result {
    display: none;
    margin-top: 24px;
    padding: 20px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

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

.result.wajib {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid var(--success);
}

.result.tidak-wajib {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-left: 4px solid var(--info);
}

.result h4 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result .amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 12px 0;
}

.result .detail {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.result .detail strong {
    color: var(--text);
}

.tips {
    background: var(--bg);
    padding: 24px;
    border-top: 1px solid var(--border);
}

.tips h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.tips ul {
    list-style: none;
}

.tips li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text);
    font-size: 15px;
}

.tips li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.share-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    padding: 32px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.share-section h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.share-section p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 15px;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.btn-share:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-share:active {
    transform: translateY(0);
}

.btn-share svg {
    width: 20px;
    height: 20px;
}

footer {
    background: var(--text);
    color: white;
    padding: 24px;
    text-align: center;
    font-size: 14px;
}

footer p {
    margin: 8px 0;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

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

.disclaimer {
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

/* Mobile responsive */
@media (max-width: 640px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
    }

    header {
        padding: 24px 20px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .tab {
        font-size: 13px;
        padding: 14px 8px;
    }

    .tab-content {
        padding: 24px 20px;
    }

    .result .amount {
        font-size: 28px;
    }
}
