@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
    --gold: #d4af37;
    --gold-light: #f4e4a6;
    --gold-glow: rgba(212, 175, 55, 0.6);
    --deep-purple: #1a0a2e;
    --cosmic-black: #0a0612;
    --mystic-purple: #2d1b4e;
    --ethereal: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: radial-gradient(ellipse at center, var(--deep-purple) 0%, var(--cosmic-black) 70%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    color: var(--gold-light);
}

/* Starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, var(--gold), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--gold-light), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 230px 80px, var(--gold), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 370px 60px, var(--gold-light), transparent),
        radial-gradient(2px 2px at 450px 180px, rgba(255,255,255,0.3), transparent);
    background-size: 500px 200px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Sacred Geometry Background */
.sacred-geometry {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.metatron {
    width: 600px;
    height: 600px;
    animation: rotate 120s linear infinite;
}

.metatron .outer-circle,
.metatron .inner-circle,
.metatron .node {
    fill: none;
    stroke: var(--gold);
    stroke-width: 0.5;
}

.metatron .line {
    stroke: var(--gold);
    stroke-width: 0.5;
    opacity: 0.7;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* Avatar - All-seeing eye in triangle */
.avatar {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
}

.avatar.small {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

.triangle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    border-bottom: 120px solid transparent;
    filter: drop-shadow(0 0 20px var(--gold-glow));
}

.avatar.small .triangle {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid transparent;
}

.triangle::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -65px;
    width: 0;
    height: 0;
    border-left: 65px solid transparent;
    border-right: 65px solid transparent;
    border-bottom: 110px solid var(--gold);
    opacity: 0.3;
}

.avatar.small .triangle::before {
    top: 7px;
    left: -46px;
    border-left: 46px solid transparent;
    border-right: 46px solid transparent;
    border-bottom: 78px solid var(--gold);
}

.triangle::after {
    content: '';
    position: absolute;
    top: 15px;
    left: -60px;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid var(--cosmic-black);
}

.avatar.small .triangle::after {
    top: 10px;
    left: -42px;
    border-left: 42px solid transparent;
    border-right: 42px solid transparent;
    border-bottom: 72px solid var(--cosmic-black);
}

.eye {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 30px;
    background: var(--cosmic-black);
    border: 2px solid var(--gold);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 15px var(--gold-glow), inset 0 0 10px rgba(212, 175, 55, 0.2);
}

.avatar.small .eye {
    width: 35px;
    height: 21px;
}

.eye-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #4a90d9 0%, #1a4a7a 50%, #0a1a2a 100%);
    border-radius: 50%;
    animation: look 4s ease-in-out infinite;
}

.avatar.small .eye-inner {
    width: 14px;
    height: 14px;
}

.pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--cosmic-black);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--gold);
}

.avatar.small .pupil {
    width: 6px;
    height: 6px;
}

@keyframes look {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-40%, -50%); }
    75% { transform: translate(-60%, -50%); }
}

/* Typography */
.title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold-glow);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    font-style: italic;
    color: var(--gold-light);
    opacity: 0.8;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

/* Link Buttons */
.links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(45, 27, 78, 0.6) 100%);
    border: 1px solid var(--gold);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.link-btn:hover::before {
    left: 100%;
}

.link-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(45, 27, 78, 0.8) 100%);
    box-shadow: 0 0 30px var(--gold-glow), inset 0 0 20px rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
}

.glyph {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--gold-glow);
}

.link-text {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.link-desc {
    font-size: 0.8rem;
    color: var(--gold-light);
    opacity: 0.6;
    font-style: italic;
    margin-top: 3px;
}

.beta-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.55rem;
    background: linear-gradient(135deg, var(--gold) 0%, #b8962d 100%);
    color: var(--cosmic-black);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Scroll/About Content */
.scroll {
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.9) 0%, rgba(10, 6, 18, 0.95) 100%);
    border: 1px solid var(--gold);
    border-radius: 4px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.scroll-header {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--gold);
    padding: 12px;
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid var(--gold);
}

.scroll-content {
    padding: 25px;
    text-align: left;
    line-height: 1.8;
}

.scroll-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.scroll-content .intro {
    font-size: 1.15rem;
    color: var(--gold);
}

.scroll-content .statement {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.scroll-content .mantra {
    text-align: center;
    color: var(--gold);
    font-size: 1rem;
    margin: 25px 0;
}

.scroll-content .section-lead {
    color: var(--gold-light);
    margin-top: 30px;
    margin-bottom: 15px;
}

.scroll-content strong {
    color: var(--gold);
    font-weight: 600;
}

.scroll-content em {
    font-style: italic;
    color: var(--gold-light);
}

.scroll-content ul {
    list-style: none;
    margin: 15px 0;
    padding-left: 10px;
}

.scroll-content li {
    margin-bottom: 10px;
    font-size: 1rem;
}

.scroll-content .closing {
    text-align: center;
    font-style: italic;
    color: var(--gold);
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Sigil */
.sigil {
    margin-top: 30px;
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.5;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Floating Particles */
.particle {
    position: fixed;
    bottom: -20px;
    font-size: 1rem;
    color: var(--gold);
    pointer-events: none;
    animation: float-up linear forwards;
    z-index: 0;
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Donate Button */
.donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 25px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(45, 27, 78, 0.6) 100%);
    border: 1px solid var(--gold);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--gold);
}

.donate-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(45, 27, 78, 0.8) 100%);
    box-shadow: 0 0 30px var(--gold-glow);
    transform: translateY(-3px);
}

.donate-btn .glyph {
    margin-bottom: 0;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 6, 18, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Modal Box */
.modal {
    background: linear-gradient(135deg, var(--deep-purple) 0%, var(--cosmic-black) 100%);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s ease;
    box-shadow: 0 0 60px var(--gold-glow), 0 0 100px rgba(212, 175, 55, 0.2);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--gold-glow);
}

.modal-header .glyph {
    margin-bottom: 0;
    font-size: 1.8rem;
}

.wallet-list {
    margin-top: 15px;
}

.donate-intro {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--gold-light);
    opacity: 0.7;
    margin-bottom: 15px;
    text-align: center;
}

.wallet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.wallet:last-child {
    margin-bottom: 0;
}

.wallet-name {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    min-width: 100px;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--gold-light);
    opacity: 0.7;
}

.copy-hint {
    font-size: 0.7rem;
    color: var(--gold-light);
    opacity: 0.5;
    font-style: italic;
    transition: all 0.3s ease;
}

.copy-hint.copied {
    color: #5cdb5c;
    opacity: 1;
}

/* Portal Links (Know Thy Self Modal) */
.portal-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 20px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.portal-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.15), transparent);
    transition: left 0.5s ease;
}

.portal-link:hover::before {
    left: 100%;
}

.portal-link:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.portal-link .glyph {
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 6px;
    text-shadow: 0 0 10px var(--gold-glow);
}

.portal-text {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.portal-desc {
    font-size: 0.75rem;
    color: var(--gold-light);
    opacity: 0.6;
    font-style: italic;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 480px) {
    .title {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .metatron {
        width: 400px;
        height: 400px;
    }

    .avatar {
        width: 110px;
        height: 110px;
    }

    .triangle {
        border-left: 55px solid transparent;
        border-right: 55px solid transparent;
        border-bottom: 95px solid transparent;
    }

    .triangle::before {
        left: -51px;
        border-left: 51px solid transparent;
        border-right: 51px solid transparent;
        border-bottom: 87px solid var(--gold);
    }

    .triangle::after {
        left: -47px;
        border-left: 47px solid transparent;
        border-right: 47px solid transparent;
        border-bottom: 79px solid var(--cosmic-black);
    }

    .eye {
        width: 40px;
        height: 24px;
    }

    .eye-inner {
        width: 16px;
        height: 16px;
    }

    .wallet {
        flex-wrap: wrap;
        gap: 5px;
    }

    .wallet-name {
        min-width: 80px;
        font-size: 0.8rem;
    }

    .wallet-address {
        font-size: 0.65rem;
    }

    .copy-hint {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }

    .modal {
        padding: 20px;
        max-height: 90vh;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .donate-btn {
        font-size: 0.9rem;
        padding: 14px 20px;
    }
}
