@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
    --background: 230 35% 7%;
    --foreground: 40 100% 97%;
    
    --card: 230 30% 12%;
    --card-foreground: 40 100% 97%;
    
    --popover: 230 30% 12%;
    --popover-foreground: 40 100% 97%;
    
    --primary: 45 100% 50%;
    --primary-foreground: 230 35% 7%;
    
    --secondary: 350 80% 45%;
    --secondary-foreground: 40 100% 97%;
    
    --muted: 230 25% 20%;
    --muted-foreground: 230 15% 70%;
    
    --accent: 280 60% 50%;
    --accent-foreground: 40 100% 97%;
    
    --destructive: 0 84% 60%;
    --destructive-foreground: 40 100% 97%;
    
    --border: 230 25% 25%;
    --input: 230 25% 20%;
    --ring: 45 100% 50%;
    
    --radius: 1rem;
    
    --snow: 210 40% 98%;
    --gold: 45 100% 50%;
    --gold-light: 45 100% 70%;
    --crimson: 350 80% 45%;
    --night: 230 35% 7%;
    --night-light: 260 40% 20%;
    --star: 45 100% 85%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Quicksand', sans-serif;
    font-feature-settings: "rlig" 1, "calt" 1;
    overflow-x: hidden;
}

.font-display {
    font-family: 'Cinzel Decorative', cursive;
}

.font-body {
    font-family: 'Quicksand', sans-serif;
}

.text-glow {
    text-shadow: 0 0 10px hsl(var(--gold) / 0.5), 0 0 30px hsl(var(--gold) / 0.3), 0 0 50px hsl(var(--gold) / 0.2);
}

.text-glow-white {
    text-shadow: 0 0 10px hsl(var(--snow) / 0.8), 0 0 20px hsl(var(--snow) / 0.4);
}

.card-magic {
    background: linear-gradient(135deg, hsl(var(--card) / 0.9), hsl(var(--night-light) / 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid hsl(var(--gold) / 0.2);
    box-shadow: 0 0 30px hsl(var(--gold) / 0.1), inset 0 1px 0 hsl(var(--snow) / 0.1);
}

.btn-magic {
    background: linear-gradient(135deg, hsl(var(--crimson)), hsl(350 80% 35%));
    box-shadow: 0 4px 20px hsl(var(--crimson) / 0.4), 0 0 40px hsl(var(--gold) / 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-magic:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 30px hsl(var(--crimson) / 0.5), 0 0 60px hsl(var(--gold) / 0.3);
}

.btn-magic:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
}

/* Utility classes */
.min-h-screen {
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(to bottom, hsl(var(--background)), hsl(var(--night-light) / 0.3), hsl(var(--background)));
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-5 {
    z-index: 5;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-2xl {
    max-width: 42rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-12 {
    margin-top: 3rem;
}

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

.text-left {
    text-align: left;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-primary {
    color: hsl(var(--primary));
}

.text-foreground {
    color: hsl(var(--foreground));
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.text-gold {
    color: hsl(var(--gold));
}

.text-gold-light {
    color: hsl(var(--gold-light));
}

.text-snow {
    color: hsl(var(--snow));
}

.text-white {
    color: white;
}

.text-accent {
    color: hsl(var(--accent));
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.italic {
    font-style: italic;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-10 {
    width: 2.5rem;
}

.w-20 {
    width: 5rem;
}

.w-full {
    width: 100%;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-20 {
    height: 5rem;
}

.min-h-200px {
    min-height: 200px;
}

.bg-muted-30 {
    background-color: hsl(var(--muted) / 0.3);
}

.bg-muted-50 {
    background-color: hsl(var(--muted) / 0.5);
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-amber-50-10 {
    --tw-gradient-from: rgba(255, 251, 235, 0.1);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 251, 235, 0));
}

.to-amber-100-5 {
    --tw-gradient-to: rgba(254, 243, 199, 0.05);
}

.from-crimson {
    --tw-gradient-from: hsl(var(--crimson));
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, hsl(var(--crimson) / 0));
}

.to-red-700 {
    --tw-gradient-to: hsl(0 72% 50%);
}

.from-green-400 {
    --tw-gradient-from: hsl(142 76% 36%);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, hsl(142 76% 36% / 0));
}

.to-green-600 {
    --tw-gradient-to: hsl(142 71% 45%);
}

.border {
    border-width: 1px;
}

.border-gold-20 {
    border-color: hsl(var(--gold) / 0.2);
}

.border-gold-30 {
    border-color: hsl(var(--gold) / 0.3);
}

.bg-background-95 {
    background-color: hsl(var(--background) / 0.95);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.pointer-events-none {
    pointer-events: none;
}

.overflow-hidden {
    overflow: hidden;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.cursor-pointer {
    cursor: pointer;
}

.resize-none {
    resize: none;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.underline {
    text-decoration: underline;
}

.underline-offset-4 {
    text-decoration-offset: 4px;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Input styles */
.input-field,
.textarea-field,
.wish-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid;
    background-color: hsl(var(--input));
    color: hsl(var(--foreground));
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field:focus,
.textarea-field:focus,
.wish-input:focus {
    outline: none;
    border-color: hsl(var(--gold));
    box-shadow: 0 0 0 3px hsl(var(--gold) / 0.3);
}

.textarea-field {
    min-height: 200px;
}

.placeholder-muted-50::placeholder {
    color: hsl(var(--muted-foreground) / 0.5);
}

/* Radio styles */
.radio-group {
    display: flex;
    flex-direction: column;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: hsl(var(--muted) / 0.3);
    transition: background-color 0.2s;
    cursor: pointer;
}

.radio-option:hover {
    background-color: hsl(var(--muted) / 0.5);
}

.radio-input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: hsl(var(--gold));
    cursor: pointer;
}

.radio-label {
    cursor: pointer;
    flex: 1;
}

/* Animations */
@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(100px) rotate(360deg);
        opacity: 0.3;
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes sleigh-fly {
    0% { transform: translateX(-100vw) translateY(0); }
    50% { transform: translateX(0) translateY(-30px); }
    100% { transform: translateX(100vw) translateY(0); }
}

@keyframes letter-fly {
    0% { 
        transform: translateY(0) scale(1) rotate(0deg); 
        opacity: 1;
    }
    50% { 
        transform: translateY(-200px) scale(0.8) rotate(10deg); 
        opacity: 0.8;
    }
    100% { 
        transform: translateY(-500px) scale(0.3) rotate(20deg); 
        opacity: 0;
    }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px hsl(var(--gold) / 0.3); }
    50% { box-shadow: 0 0 40px hsl(var(--gold) / 0.6), 0 0 60px hsl(var(--crimson) / 0.3); }
}

@keyframes envelope-seal {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-snowfall {
    animation: snowfall linear infinite;
}

.animate-twinkle {
    animation: twinkle ease-in-out infinite;
}

.animate-float {
    animation: float ease-in-out infinite;
}

.animate-sparkle {
    animation: sparkle ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-sleigh {
    animation: sleigh-fly 8s ease-in-out forwards;
}

.animate-letter-fly {
    animation: letter-fly 2s ease-in forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-envelope-seal {
    animation: envelope-seal 0.5s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scale-in 0.4s ease-out forwards;
}

/* Snowflake and star icons */
.snowflake-icon,
.star-icon {
    display: inline-block;
}

.snowflake-icon::before {
    content: '❄';
}

.star-icon::before {
    content: '⭐';
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--night));
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(hsl(var(--gold) / 0.5), hsl(var(--crimson) / 0.5));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(hsl(var(--gold)), hsl(var(--crimson)));
}

/* Responsive */
@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

