@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --delft: #1e3a5f;
    --delft-light: #2c5282;
    --delft-pale: #e8eef6;
    --orange: #e87722;
    --orange-light: #f09952;
    --bg: #f7f5f2;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-mid: #4a4a4a;
    --text-light: #8a8a8a;
    --border: #e2e0dc;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--white);
    text-align: center;
    padding: 3.5rem 1.5rem 3rem;
    border-bottom: 3px solid var(--delft);
}

.header-content {
    max-width: 700px;
    margin: 0 auto;
}

.bismillah {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: var(--delft);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.header .subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.detail-item {
    padding: 1rem 2rem;
    border-left: 1px solid var(--border);
}

.detail-item:first-child {
    border-left: none;
}

.detail-item .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-item .value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--delft);
}

/* Intro */
.intro-section {
    max-width: 820px;
    margin: 2.5rem auto 0;
    padding: 0 1.5rem;
}

.intro-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2.5rem 2.5rem;
}

/* Language tabs */
.lang-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
}

.lang-tab {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.lang-tab:hover {
    color: var(--text-mid);
}

.lang-tab.active {
    color: var(--delft);
}

.lang-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--delft);
}

.lang-content {
    display: none;
}

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

.intro-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.intro-card p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.intro-card p:last-of-type {
    margin-bottom: 0;
}

.guest-highlight {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #fef8f0;
    border: 1px solid #f0dcc3;
    border-radius: 4px;
}

.guest-highlight .guest-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--orange);
    margin-bottom: 0.5rem;
}

.guest-highlight p {
    color: var(--text-mid);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.guest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guest-list li {
    color: var(--text-mid);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.4rem 0;
    padding-left: 1rem;
    border-left: 2px solid var(--orange-light);
    margin-bottom: 0.5rem;
}

.guest-list li:last-child {
    margin-bottom: 0;
}

.intro-note {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--delft);
    background: var(--delft-pale);
    color: var(--delft);
    font-size: 0.9rem;
    line-height: 1.7;
    font-style: italic;
}

/* Progress bar */
.progress-section {
    max-width: 820px;
    margin: 2.5rem auto 0;
    padding: 0 1.5rem;
}

.progress-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem 1.75rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.progress-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-mid);
}

.progress-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-count span {
    color: var(--delft);
    font-weight: 700;
}

.progress-bar {
    height: 6px;
    background: var(--delft-pale);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--orange);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Signup section */
.signup-section {
    max-width: 820px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.signup-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.signup-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.signup-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.signup-form {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
    margin: 0 auto;
}

.signup-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s;
    outline: none;
    background: var(--bg);
}

.signup-form input:focus {
    border-color: var(--delft);
}

.signup-form button {
    padding: 0.8rem 1.6rem;
    background: var(--delft);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}

.signup-form button:hover {
    background: var(--delft-light);
}

.signup-form button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.signup-result {
    margin-top: 1.2rem;
    padding: 0.9rem 1.2rem;
    border-radius: 4px;
    display: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.signup-result.success {
    display: block;
    background: var(--delft-pale);
    color: var(--delft);
}

.signup-result.error {
    display: block;
    background: #fef0e6;
    color: #c4550a;
}

.signup-result.full {
    display: block;
    background: var(--delft-pale);
    color: var(--delft);
}

/* Juz grid */
.juz-section {
    max-width: 820px;
    margin: 1.5rem auto;
    padding: 0 1.5rem 4rem;
}

.juz-section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-mid);
    margin-bottom: 1rem;
}

.juz-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.juz-card {
    background: var(--white);
    padding: 1rem 0.75rem;
    text-align: center;
    transition: background 0.15s;
}

.juz-card:hover {
    background: #fafaf8;
}

.juz-card.taken {
    background: var(--delft-pale);
}

.juz-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.juz-card.taken .juz-number {
    background: var(--delft);
    color: var(--white);
}

.juz-name {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    font-style: italic;
}

.juz-person {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--delft);
}

.juz-status {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        padding: 2.5rem 1.25rem 2rem;
    }

    .bismillah {
        font-size: 1.4rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .event-details {
        gap: 0;
    }

    .detail-item {
        padding: 0.75rem 1.2rem;
        border-left: none;
        border-top: 1px solid var(--border);
        flex: 1 1 50%;
    }

    .detail-item:first-child,
    .detail-item:nth-child(2) {
        border-top: none;
    }

    .signup-form {
        flex-direction: column;
    }

    .juz-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .progress-card,
    .signup-card {
        padding: 1.2rem 1.25rem;
    }

    .signup-card {
        padding: 1.5rem 1.25rem;
    }
}
