@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Quicksand:wght@300;500&display=swap');

:root {
    --mystic-purple: #2d1b4e;
    --mystic-gold: #c5a059;
    --mystic-black: #0f0a1a;
    --mystic-accent: #8e44ad;
}

body {
    background-color: var(--mystic-black);
    color: #e0e0e0;
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    margin: 0;
}

h1, h2, h3, .mystic-font {
    font-family: 'Cinzel', serif;
    color: var(--mystic-gold);
}

.nebula-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a0f2e 0%, #0f0a1a 100%);
    z-index: -2;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/123163/stars.png') repeat top center;
    z-index: -1;
    opacity: 0.5;
}

/* Pendulum Animation */
.pendulum-container {
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}

.pendulum-string {
    width: 2px;
    height: 200px;
    background: var(--mystic-gold);
    transform-origin: top center;
    position: relative;
}

.pendulum-bob {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, var(--mystic-gold), #8a6d3b);
    border-radius: 50%;
    position: absolute;
    bottom: -20px;
    left: -19px;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
}

@keyframes swing {
    0% { transform: rotate(-30deg); }
    50% { transform: rotate(30deg); }
    100% { transform: rotate(-30deg); }
}

@keyframes circle-swing {
    0% { transform: rotate(0deg) translateX(20px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
}

.swinging {
    animation: swing 2s ease-in-out infinite;
}

.circling {
    animation: circle-swing 3s linear infinite;
}

/* Card Styling */
.mystic-card {
    background: rgba(45, 27, 78, 0.4);
    border: 1px solid rgba(197, 160, 89, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mystic-card:hover {
    border-color: var(--mystic-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mystic-black);
}

::-webkit-scrollbar-thumb {
    background: var(--mystic-purple);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mystic-gold);
}

.glow-text {
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.8);
}

.answer-box {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .pendulum-container {
        margin-top: 30px;
    }

    .pendulum-string {
        height: 150px;
    }

    .pendulum-bob {
        width: 30px;
        height: 30px;
        bottom: -15px;
        left: -14px;
    }

    .answer-box {
        font-size: 1.2rem;
        padding: 15px;
        min-height: 80px;
    }

    /* Reduce padding on mobile for better space usage */
    .mystic-card {
        padding: 1rem !important;
    }

    /* Adjust header for mobile */
    header {
        padding: 1rem;
    }

    /* Make navigation more mobile-friendly */
    nav ul {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    nav ul li {
        margin: 0;
    }

    /* Improve readability on small screens */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Adjust grid layouts for mobile */
    .grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .pendulum-string {
        height: 120px;
    }

    .pendulum-bob {
        width: 25px;
        height: 25px;
        bottom: -12px;
        left: -11px;
    }

    /* Reduce font sizes further */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
    }

    /* Adjust button sizes */
    .mystic-card p-8 {
        padding: 1rem !important;
    }

    /* Stack footer links vertically */
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .mystic-card:hover {
        transform: none;
        border-color: rgba(197, 160, 89, 0.2);
    }

    .group:hover .group-hover\\:scale-110 {
        transform: scale(1.05);
    }
}

/* Improve accessibility on mobile */
@media (max-width: 768px) {
    /* Increase tap targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Better text contrast */
    .text-gray-400 {
        color: #d1d5db !important;
    }

    .text-gray-500 {
        color: #9ca3af !important;
    }
}

