/* Custom Properties for Colors */
:root {
    --obsidian: #1C1C1C;
    --lava-red: #4B0000;
    --titanium-white: #E1E1E1;
    --dark-blue-metal: #0D1A2F;
    --ivory: #F5E2D3;
    --rose-copper: #9E4D57;
    --dust-grey: #A9A9A9;
    --gold: #D4AF37;
}

/* Base Styles */
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background-color: #121212;
    color: var(--titanium-white);
    font-family: 'EB Garamond', serif;
}

section {
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Font Families */
.font-eb-garamond { font-family: 'EB Garamond', serif; }
.font-inter { font-family: 'Inter', sans-serif; }
.font-space-grotesk { font-family: 'Space Grotesk', sans-serif; }

/* Background Textures */
.marble-texture {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.15'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.volcanic-ash-texture {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.08' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)' opacity='0.2'/%3E%3C/svg%3E");
    background-color: #2a0001;
    background-blend-mode: overlay;
}

.steel-texture {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.2 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='0.1'/%3E%3C/svg%3E");
    background-color: var(--dark-blue-metal);
    background-blend-mode: overlay;
}

.rose-texture {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.07' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.3 0 0 0 0 0.35 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)' opacity='0.15'/%3E%3C/svg%3E");
    background-color: #6D2E33;
    background-blend-mode: soft-light;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    33% { transform: translateX(2px); }
    66% { transform: translateX(-2px); }
}

@keyframes petalFall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

@keyframes glitch-effect {
    0% { clip: rect(76px, 900px, 91px, 0); }
    5% { clip: rect(60px, 900px, 82px, 0); }
    10% { clip: rect(37px, 900px, 98px, 0); }
    15% { clip: rect(20px, 900px, 78px, 0); }
    20% { clip: rect(89px, 900px, 97px, 0); }
    25% { clip: rect(75px, 900px, 32px, 0); }
    30% { clip: rect(53px, 900px, 62px, 0); }
    35% { clip: rect(10px, 900px, 66px, 0); }
    40% { clip: rect(1px, 900px, 9px, 0); }
    45% { clip: rect(89px, 900px, 31px, 0); }
    50% { clip: rect(33px, 900px, 93px, 0); }
    55% { clip: rect(90px, 900px, 56px, 0); }
    60% { clip: rect(24px, 900px, 21px, 0); }
    65% { clip: rect(75px, 900px, 95px, 0); }
    70% { clip: rect(22px, 900px, 84px, 0); }
    75% { clip: rect(67px, 900px, 68px, 0); }
    80% { clip: rect(95px, 900px, 48px, 0); }
    85% { clip: rect(54px, 900px, 38px, 0); }
    90% { clip: rect(46px, 900px, 75px, 0); }
    95% { clip: rect(61px, 900px, 14px, 0); }
    100% { clip: rect(27px, 900px, 59px, 0); }
}

/* Animation Classes */
.slow-float { animation: float 6s ease-in-out infinite; }
.text-glitch { animation: glitch 3s ease-in-out infinite; }
.petal-fall { animation: petalFall 15s linear infinite; }

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, 
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip: rect(0, 0, 0, 0);
}

.glitch-text.active::before {
    clip: rect(0, 900px, 0, 0);
    animation: glitch-effect 2s infinite linear alternate-reverse;
    text-shadow: -2px 0 #ff0000;
    background: rgba(244, 0, 0, 0.1);
    transform: translateX(-1px);
}

.glitch-text.active::after {
    clip: rect(0, 900px, 0, 0);
    animation: glitch-effect 3s infinite linear alternate-reverse;
    text-shadow: 2px 0 #00ffff;
    background: rgba(0, 244, 244, 0.1);
    transform: translateX(1px);
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    margin: 12px 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* Language Toggle */
.lang-toggle {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-toggle:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.lang-toggle.active {
    opacity: 1;
    color: var(--gold);
}

/* Form Styles */
.stone-input {
    width: 100%;
    background: transparent;
    border: 2px solid var(--dust-grey);
    padding: 0.75rem;
    color: var(--titanium-white);
    font-family: 'EB Garamond', serif;
    transition: border-color 0.3s ease;
}

.stone-input:focus {
    border-color: var(--gold);
    outline: none;
}

.stone-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: var(--dust-grey);
    transition: all 0.3s ease;
    pointer-events: none;
}

.stone-input:focus + .stone-label,
.stone-input:not(:placeholder-shown) + .stone-label {
    top: -0.75rem;
    left: 0.5rem;
    font-size: 0.75rem;
    color: var(--gold);
}

/* Particle and Petal Styles */
.particle {
    position: absolute;
    background: var(--titanium-white);
    opacity: 0.3;
    border-radius: 50%;
}

.petal {
    position: absolute;
    background: var(--rose-copper);
    border-radius: 50%;
}

/* Sword Slash */
.sword-slash {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

/* Greek Pattern (Placeholder) */
.greek-pattern {
    background: repeating-linear-gradient(
        45deg,
        var(--gold),
        var(--gold) 10px,
        transparent 10px,
        transparent 20px
    );
}

/* Engraved Text (Placeholder) */
.engraved-text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Tailwind Utilities */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Tailwind Classes */
.bg-lava-red { background-color: var(--lava-red); }
.bg-dark-blue-metal { background-color: var(--dark-blue-metal); }
.bg-rose-copper { background-color: var(--rose-copper); }
.text-dust-grey { color: var(--dust-grey); }
.text-gold { color: var(--gold); }
.border-gold { border-color: var(--gold); }

.lang-toggle.active {
    color: #D4AF37; /* 金色 */
    font-weight: 700;
}
