/* Header - reuse from homepage */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(26, 28, 32, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 246, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 246, 255, 0.5));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: var(--color-cyan);
}

/* Rules Hero */
.rules-hero {
    padding: 150px 0 40px;
    text-align: center;
    background: radial-gradient(ellipse at center top, rgba(0, 246, 255, 0.08) 0%, transparent 60%);
}

.rules-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    letter-spacing: 6px;
}

.rules-hero p {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.rules-hero-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 4rem auto;
    filter: drop-shadow(0 0 20px rgba(0, 246, 255, 0.5));
}

/* Table of Contents */
.toc-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.toc {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(34, 38, 45, 0.8);
    border: 1px solid rgba(0, 246, 255, 0.12);
    border-radius: 12px;
    padding: 2rem;
}

.toc-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.toc-title i {
    color: var(--color-cyan);
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.toc-item:hover {
    background: rgba(0, 246, 255, 0.08);
    color: #fff;
}

.toc-item i {
    color: var(--color-cyan);
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 246, 255, 0.3);
    background: rgba(26, 28, 32, 0.95);
    color: var(--color-cyan);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s;
    z-index: 90;
    backdrop-filter: blur(8px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(0, 246, 255, 0.15);
    border-color: rgba(0, 246, 255, 0.5);
}

/* Section styling */
.section-alt {
    background: rgba(0, 0, 0, 0.3);
}

.rules-section {
    max-width: 900px;
    margin: 0 auto;
}

.rules-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.rules-section h2 i {
    color: var(--color-cyan);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Objective Box */
.objective-box {
    background: rgba(0, 246, 255, 0.05);
    border-color: rgba(0, 246, 255, 0.3);
    margin-bottom: 2rem;
}

.objective-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.objective-box h3 i {
    color: var(--color-cyan);
}

.objective-box p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Game Material */
.game-material h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-material h3 i {
    color: var(--color-cyan);
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.material-item {
    text-align: center;
    padding: 1.5rem;
}

.material-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-cyan);
    margin-bottom: 0.5rem;
}

.material-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Card Hierarchy */
.hierarchy-visual {
    margin-top: 2rem;
}

.hierarchy-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.chain-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.chain-card img {
    width: 60px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.chain-card:hover img {
    transform: translateY(-5px);
}

.chain-card.chain-special img {
    box-shadow: 0 4px 20px rgba(85, 227, 161, 0.4);
    border: 2px solid var(--color-green);
}

.chain-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-card);
    border: 2px solid rgba(0, 246, 255, 0.3);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.chain-card.chain-special .chain-number {
    border-color: var(--color-green);
    color: var(--color-green);
}

.chain-dots {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    padding: 0 0.5rem;
}

.hierarchy-chain > i {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.chain-loop {
    color: var(--color-green) !important;
}

.hierarchy-note {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.hierarchy-note i {
    color: var(--color-cyan);
    margin-right: 0.5rem;
}

/* Play Zones */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.zone-card {
    text-align: center;
    padding: 2rem;
}

.zone-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.zone-icon.court {
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.zone-icon.walls {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.zone-icon.backstage {
    background: rgba(168, 85, 247, 0.15);
    border: 2px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

.zone-icon.gardens {
    background: rgba(85, 227, 161, 0.15);
    border: 2px solid rgba(85, 227, 161, 0.4);
    color: var(--color-green);
}

.zone-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.zone-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.zone-limit {
    display: inline-block;
    background: rgba(0, 246, 255, 0.1);
    color: var(--color-cyan);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.zone-shared {
    grid-column: span 2;
}

/* Garden Grid Visual */
.garden-grid-visual {
    margin: 1.5rem 0;
}

.garden-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 8px;
    max-width: 280px;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
    background: rgba(85, 227, 161, 0.05);
    border: 2px solid rgba(85, 227, 161, 0.2);
    border-radius: 12px;
}

.garden-cell {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: visible;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.garden-cell:not(.empty):hover {
    transform: scale(1.05);
    z-index: 1;
}

.garden-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.garden-cell.empty {
    background: rgba(255, 255, 255, 0.02);
}

.garden-number {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--color-bg-card);
    border: 2px solid rgba(0, 246, 255, 0.4);
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: #fff;
}

/* Hand Limit */
.hand-rule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
}

.hand-rule p {
    flex: 1;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.hand-limit-visual {
    text-align: center;
}

.limit-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-cyan);
    line-height: 1;
}

.limit-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Actions */
.actions-intro {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.action-type {
    padding: 1.5rem;
}

.action-type h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-cyan);
}

.action-type p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.action-type ul {
    list-style: none;
    margin-top: 1rem;
}

.action-type ul li {
    color: var(--color-text-muted);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.action-type ul li::before {
    content: '•';
    color: var(--color-cyan);
    position: absolute;
    left: 0;
}

.subsection-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.actions-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.action-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
}

.action-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: rgba(0, 246, 255, 0.1);
    border: 2px solid rgba(0, 246, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--color-cyan);
}

.action-content h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.action-content p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Conspiracy */
.conspiracy-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.conspiracy-item {
    text-align: center;
    padding: 1.5rem 1rem;
}

.conspiracy-item i {
    font-size: 1.8rem;
    color: var(--color-cyan);
    margin-bottom: 1rem;
    display: block;
}

.conspiracy-item span {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.reaction-box {
    background: rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.3);
}

.reaction-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reaction-box h3 i {
    color: #a855f7;
}

.reaction-box p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Gardens Bonus */
.gardens-bonuses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.bonus-card {
    text-align: center;
    padding: 2rem;
}

.bonus-visual {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.bonus-card-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bonus-card-img img {
    width: 70px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.bonus-card-img:hover img {
    transform: translateY(-5px);
}

.bonus-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-card);
    border: 2px solid rgba(0, 246, 255, 0.3);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.bonus-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.bonus-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Predispositions */
.predisposition-intro {
    background: rgba(0, 246, 255, 0.05);
    border-color: rgba(0, 246, 255, 0.3);
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
}

.predisposition-intro h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.predisposition-intro h3 i {
    color: var(--color-cyan);
}

.predisposition-intro p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.predisposition-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.predisposition-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.predisposition-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.predisposition-icon.protagonist-icon {
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.predisposition-icon.protector-icon {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.predisposition-icon.conspirator-icon {
    background: rgba(168, 85, 247, 0.15);
    border: 2px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

.predisposition-icon.outcast-icon {
    background: rgba(255, 107, 122, 0.15);
    border: 2px solid rgba(255, 107, 122, 0.4);
    color: var(--color-red);
}

.predisposition-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.predisposition-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.reveal-tokens-box {
    background: rgba(85, 227, 161, 0.05);
    border-color: rgba(85, 227, 161, 0.3);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.reveal-tokens-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.reveal-tokens-header i {
    font-size: 1.4rem;
    color: var(--color-green);
}

.reveal-tokens-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin: 0;
}

.reveal-tokens-box p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.predisposition-note {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.predisposition-note i {
    color: var(--color-cyan);
    margin-right: 0.5rem;
}

/* Ultimate Decrees */
.decrees-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.decree-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.decree-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.decree-icon.total-war-icon {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.decree-icon.peace-treaty-icon {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.decree-icon.infiltration-icon {
    background: rgba(168, 85, 247, 0.15);
    border: 2px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

.decree-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.decree-prereq {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 6px;
    color: #ffc107;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.decree-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Victory */
.victory-conditions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.victory-card {
    flex: 1;
    max-width: 350px;
    text-align: center;
    padding: 2rem;
}

.victory-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 107, 122, 0.15);
    border: 2px solid rgba(255, 107, 122, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-red);
}

.victory-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.victory-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.victory-or {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* CTA Section */
.cta {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 246, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 246, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    width: 40px;
    filter: drop-shadow(0 0 10px rgba(0, 246, 255, 0.5));
}

.footer-logo span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .rules-section h2 {
        font-size: 1.35rem;
    }

    .material-grid {
        grid-template-columns: 1fr;
    }

    .zones-grid {
        grid-template-columns: 1fr;
    }

    .zone-shared {
        grid-column: span 1;
    }

    .hand-rule {
        flex-direction: column;
        text-align: center;
    }

    .actions-intro,
    .actions-list,
    .gardens-bonuses {
        grid-template-columns: 1fr;
    }

    .conspiracy-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .predisposition-groups-grid {
        grid-template-columns: 1fr;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .decrees-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }

    .victory-conditions {
        flex-direction: column;
    }

    .victory-or {
        margin: 1rem 0;
    }

    .chain-card img {
        width: 45px;
    }

    .chain-number,
    .bonus-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .hierarchy-chain {
        gap: 0.3rem;
        padding: 1rem;
    }

    .hierarchy-chain > i {
        font-size: 0.7rem;
    }

    .garden-grid {
        max-width: 220px;
    }

    .bonus-card-img img {
        width: 55px;
    }
}
