@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;700;900&family=Outfit:wght@300;400;700&display=swap');

:root {
    --jade-deep: #052c24;
    --jade: #1a4d40;
    --jade-light: #7fb3a0;
    --gold-brushed: #c5a059;
    --gold: #d4af37;
    --gold-bright: #ffedbc;
    --crimson: #96281b;
    --ink: #1a1a1a;
    --parchment: #fdfaf6;
    --glass: rgba(5, 44, 36, 0.6);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    background-color: var(--jade-deep);
    color: #fff;
    font-family: 'Outfit', 'Noto Serif TC', serif;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(20, 80, 65, 0.4) 0%, transparent 80%),
        linear-gradient(rgba(5, 44, 36, 0.98), rgba(5, 44, 36, 0.98));
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header-seal {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding: 40px;
    border: 2px solid var(--gold-brushed);
    background: var(--glass);
    backdrop-filter: blur(10px);
}

.dao-title {
    font-family: 'Noto Serif TC', serif;
    font-weight: 900;
    font-size: 3.5rem;
    color: var(--gold);
    letter-spacing: 12px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    margin: 0;
}

.dao-subtitle {
    color: var(--jade-light);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Navigation */
.nav-jade-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 25px;
    background: transparent;
    border: 1px solid var(--gold-brushed);
    border-radius: 4px;
    color: var(--gold);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--gold-brushed);
    color: var(--jade-deep);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}

/* Sections */
.content-section {
    display: none;
    animation: fadeInScroll 1s forwards;
}

.content-section.active {
    display: block;
}

@keyframes fadeInScroll {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-card {
    background: var(--parchment);
    color: var(--ink);
    padding: 60px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    background-image: url('https://www.transparenttextures.com/patterns/handmade-paper.png');
    border-left: 15px solid var(--gold-brushed);
    border-right: 15px solid var(--gold-brushed);
}

.scroll-card::before,
.scroll-card::after {
    content: '';
    position: absolute;
    left: -20px;
    right: -20px;
    height: 40px;
    background: var(--gold-brushed);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.scroll-card::before {
    top: -20px;
    border-radius: 20px 20px 0 0;
}

.scroll-card::after {
    bottom: -20px;
    border-radius: 0 0 20px 20px;
}

/* Ziwei Grid 4x4 */
.ziwei-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    background: var(--gold-brushed);
    border: 4px solid var(--gold-brushed);
    margin: 40px 0;
    aspect-ratio: 1 / 1.1;
}

.palace-cell {
    background: var(--parchment);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(197, 160, 89, 0.2);
    min-height: 100px;
}

.ming-gong {
    background: var(--gold-bright);
}

.palace-name {
    font-weight: 700;
    color: var(--gold);
    text-align: right;
    font-size: 0.9rem;
}

.stars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.major-star {
    writing-mode: vertical-rl;
    font-family: 'Noto Serif TC', serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--crimson);
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--gold-brushed);
    font-weight: 700;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--jade-dark);
    padding: 15px;
    color: var(--gold);
    border-radius: 4px;
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

::placeholder {
    color: rgba(197, 160, 89, 0.5);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-brushed));
    color: var(--jade-deep);
    border: none;
    padding: 18px 45px;
    border-radius: 4px;
    font-weight: 900;
    font-family: 'Noto Serif TC', serif;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-gold:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.6);
}