/**
 * 花雨庭玩家纪念网 - 自定义样式
 * Flower Rain Court Memorial - Custom Styles
 */

/* ===== Scrollbar Hide ===== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== Material Icons Fill ===== */
.fill-1 {
    font-variation-settings: 'FILL' 1;
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Selection Color ===== */
::selection {
    background-color: rgba(255, 184, 194, 0.3);
    color: inherit;
}

/* ===== Custom Scrollbar for Webkit ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 194, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 184, 194, 0.5);
}

/* ===== Focus Styles ===== */
*:focus-visible {
    outline: 2px solid #ffb8c2;
    outline-offset: 2px;
}

/* ===== Button Reset ===== */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ===== Link Reset ===== */
a {
    text-decoration: none;
    color: inherit;
}

/* ===== Image Optimization ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Card Hover Effects ===== */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(255, 184, 194, 0.15);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #ffb8c2 0%, #e89da8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Glass Effect ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Animation Keyframes ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 184, 194, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 184, 194, 0.6);
    }
}

/* ===== Animation Classes ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

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

/* ===== Stagger Animation Delays ===== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===== Memorial Cards Scroll Snap ===== */
#memorial-cards {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

#memorial-cards > div {
    scroll-snap-align: start;
}

/* ===== Video Card Play Button ===== */
.video-card .play-button {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-card:hover .play-button {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.translate-x-0 {
    transform: translateX(0);
}

#mobile-menu.translate-x-full {
    transform: translateX(100%);
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 1536px) {
    html {
        font-size: 18px;
    }
}

/* ===== Print Styles ===== */
@media print {
    header,
    footer,
    #mobile-menu,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Loading State ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 184, 194, 0.1) 25%,
        rgba(255, 184, 194, 0.2) 50%,
        rgba(255, 184, 194, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Tooltip ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}
