:root {
    --primary: #9b7be9;
    --secondary: #e2c7ff;
    --background: #1a1a2e;
    --text: #ffffff;
    --accent: #ffd7ff;
    --crystal: rgba(255, 255, 255, 0.1);
    --scroll: #fdf6e3;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mystical Background */
.mystical-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1b3d 100%);
    z-index: -1;
    overflow: hidden;
}

.moon {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffd7ff);
    border-radius: 50%;
    box-shadow: 0 0 50px #ffd7ff;
    animation: moonGlow 4s ease-in-out infinite alternate;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,...') repeat;
    opacity: 0.1;
    animation: cloudDrift 60s linear infinite;
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.time-display {
    font-family: 'Cormorant Garamond', serif;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent);
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.github-link img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Main Container */
.mystical-container {
    max-width: 1000px;
    margin: 80px auto 30px;
    padding: 20px;
}

/* Scroll Parchment */
.scroll-parchment {
    background: var(--scroll);
    border-radius: 20px;
    padding: 40px;
    color: #2a1b3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-parchment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/png;base64,...') repeat;
    opacity: 0.1;
    z-index: 0;
}

/* Header Styles */
.parchment-header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: #2a1b3d;
    margin-bottom: 10px;
    position: relative;
}

.subtitle {
    color: #666;
    font-style: italic;
}

/* Form Styles */
.mystical-form {
    display: grid;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #2a1b3d;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(42, 27, 61, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
}

/* Button Styles */
.mystical-btn {
    position: relative;
    padding: 15px 30px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #6a4c93);
    color: white;
    border-radius: 25px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.mystical-btn:hover .btn-glow {
    opacity: 0.3;
    transform: rotate(45deg) translate(50%, 50%);
}

/* Crystal Cards */
.number-crystals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.crystal-card {
    text-align: center;
}

.crystal {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.crystal .number {
    transform: rotate(-45deg);
}

.crystal:hover {
    transform: rotate(45deg) scale(1.1);
}

/* Prophecy Scroll */
.prophecy-scroll {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.prophecy-scroll h3 {
    text-align: center;
    color: #2a1b3d;
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 20px;
}

.prophecy-text {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Animations */
@keyframes moonGlow {
    from { box-shadow: 0 0 50px #ffd7ff; }
    to { box-shadow: 0 0 80px #ffd7ff; }
}

@keyframes cloudDrift {
    from { background-position: 0 0; }
    to { background-position: 1000px 0; }
}

@keyframes floatSpirit {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.spirit {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: floatSpirit 4s ease-in-out infinite;
}

.spirit1 { top: 20%; left: 10%; animation-delay: 0s; }
.spirit2 { top: 40%; right: 15%; animation-delay: 1s; }
.spirit3 { bottom: 30%; left: 20%; animation-delay: 2s; }
.spirit4 { bottom: 20%; right: 10%; animation-delay: 3s; }

/* Responsive Design */
@media (max-width: 768px) {
    .mystical-container {
        margin-top: 100px;
    }

    .scroll-parchment {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .crystal {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}