/* ── Reset ─────────────────────────────────────────────── */
* {
    box-sizing: border-box;
}

/* ── Base ──────────────────────────────────────────────── */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    line-height: 1.6;
}

/* ── Header ────────────────────────────────────────────── */
.top-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a2f 100%);
    color: white;
    padding: 28px 40px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    border-bottom: 3px solid #10b981;
}

.top-header h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 0.3px;
}

.top-header p {
    margin: 5px 0 0;
    color: #6ee7b7;
    font-size: 0.9rem;
}

.login-status span {
    font-size: 0.9rem;
    color: #a7f3d0;
    margin-right: 8px;
}

.login-status a {
    color: #0f172a;
    background: #10b981;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    margin-left: 6px;
    transition: background 0.2s;
}

.login-status a:hover {
    background: #059669;
    color: white;
}

/* ── Top nav bar ───────────────────────────────────────── */
.topnav {
    background: #0f172a;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topnav .home-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.topnav .home-link:hover {
    background: #10b981;
    color: #0f172a;
}

/* ── Burger button ─────────────────────────────────────── */
.burger-btn {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: #e2e8f0;
    transition: border-color 0.2s, background 0.2s;
}

.burger-btn:hover {
    border-color: #10b981;
    background: #0f2820;
}

.burger-btn .burger-label {
    font-size: 14px;
    font-weight: 600;
}

.burger-btn span:not(.burger-label) {
    display: block;
    width: 20px;
    height: 2px;
    background: #10b981;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Activity dropdown ─────────────────────────────────── */
.nav-dropdown {
    background: #1e293b;
    display: none;
    flex-direction: column;
    border-bottom: 2px solid #10b981;
}

.nav-dropdown.open {
    display: flex;
}

.nav-dropdown a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 28px;
    font-size: 14px;
    border-bottom: 1px solid #2d3f52;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.nav-dropdown a:last-child {
    border-bottom: none;
}

.nav-dropdown a:hover {
    background: #0f2820;
    color: #10b981;
    padding-left: 36px;
}

/* ── Main container ────────────────────────────────────── */
.container {
    width: 92%;
    max-width: 1100px;
    margin: 32px auto;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
    background: white;
    padding: 28px 30px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
    border-top: 3px solid #10b981;
}

.card h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.card h3 {
    color: #1e293b;
    font-size: 1.05rem;
}

.card ul li {
    margin-bottom: 6px;
}

/* ── Demo area ─────────────────────────────────────────── */
.demo-area {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}

/* ── Buttons ───────────────────────────────────────────── */
.source-btn,
.btn {
    border: none;
    background: #10b981;
    color: #0f172a;
    padding: 10px 16px;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 5px 4px 5px 0;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.2s, transform 0.1s;
}

.source-btn:hover,
.btn:hover {
    background: #059669;
    color: white;
    transform: translateY(-1px);
}

/* ── Source code block ─────────────────────────────────── */
.source-code {
    background: #0f172a;
    color: #a7f3d0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid #1e3a2f;
    font-size: 0.88rem;
}

/* ── Tables ────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

table th,
table td {
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    text-align: left;
}

table th {
    background: #0f172a;
    color: #a7f3d0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

table tr:nth-child(even) td {
    background: #f8fafc;
}

table tr:hover td {
    background: #ecfdf5;
}

/* ── Forms ─────────────────────────────────────────────── */
label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    display: block;
    margin-bottom: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    margin-top: 3px;
    margin-bottom: 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #f8fafc;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Alerts ────────────────────────────────────────────── */
.alert {
    padding: 13px 16px;
    border-radius: 9px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

/* ── Style gallery ─────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.gallery-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    transition: box-shadow 0.2s;
}

.gallery-item:hover {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
    border-color: #6ee7b7;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a2f 100%);
    color: #6ee7b7;
    padding: 20px;
    margin-top: 48px;
    font-size: 0.875rem;
    border-top: 3px solid #10b981;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .container {
        width: 96%;
        margin: 20px auto;
    }
}
