@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Rye&family=Inter:wght@300;400;600&display=swap');

:root {
    --c-bg: #1a0b2e;
    --c-orange: #ff7e00;
    --c-pink: #ff007f;
    --c-teal: #00ffff;
}

body {
    background-color: var(--c-bg);
    color: #f0f0f0;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, .catrina-font {
    font-family: 'Rye', serif;
}

.scary-font {
    font-family: 'Creepster', cursive;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #11051f;
}
::-webkit-scrollbar-thumb {
    background: var(--c-orange);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--c-pink);
}

/* Marigold Petal Animation */
.petal {
    position: fixed;
    top: -10vh;
    background: var(--c-orange);
    width: 15px;
    height: 15px;
    border-radius: 20% 80% 20% 80%;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(720deg);
    }
}

/* Ofrenda Grid Layout */
.ofrenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--c-orange);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--c-pink);
    box-shadow: 0 0 20px var(--c-pink);
    background: rgba(255, 0, 127, 0.1);
}

.tool-card i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--c-orange);
    transition: color 0.3s;
}

.tool-card:hover i {
    color: var(--c-teal);
}

/* Navigation Overlay */
#nav-portal {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(26, 11, 46, 0.95);
    border-left: 2px solid var(--c-pink);
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    padding: 2rem;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}

#nav-portal.open {
    right: 0;
}

.nav-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--c-pink);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px var(--c-pink);
    transition: transform 0.3s;
    font-size: 1.5rem;
}

.nav-toggle:hover {
    transform: rotate(90deg) scale(1.1);
}

.nav-link {
    display: block;
    padding: 10px 0;
    color: #fff;
    text-decoration: none;
    font-family: 'Rye', serif;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: color 0.3s, padding-left 0.3s;
}

.nav-link:hover {
    color: var(--c-orange);
    padding-left: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0,0,0,0.3);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.glow-text {
    text-shadow: 0 0 10px var(--c-orange);
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 80px auto 40px;
    padding: 2rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--c-teal);
    border-radius: 20px;
    min-height: 60vh;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

/* Utility */
.hidden { display: none; }

/* 3D Transform Utilities for Tarot */
.perspective-1000 {
    perspective: 1000px;
}
.transform-style-3d {
    transform-style: preserve-3d;
}
.backface-hidden {
    backface-visibility: hidden;
}
.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Oracle Petal Animation Helpers */
.scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Specific styling for petal falling overrides if needed */
.petal-click.falling {
    pointer-events: none;
}
