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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #C8102E;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B0000;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.hero-bg {
    background: radial-gradient(ellipse at 20% 80%, rgba(200, 16, 46, 0.1) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(0, 52, 120, 0.1) 0%, transparent 50%), linear-gradient(180deg, #0a0a0f 0%, #0f0f1a 100%);
}

.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #C8102E, #FFD700, #003478, transparent);
    position: relative;
}

.section-divider::before {
    content: '☯';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    background: white;
    padding: 0 12px;
    color: #C8102E;
    border-radius: 50%;
}

.dark .section-divider::before {
    background: #0a0a0f;
    color: #FFD700;
}

.belt-progression {
    background: linear-gradient(90deg, #FFF 0%, #FFF 16%, #FFD700 16%, #FFD700 33%, #228B22 33%, #228B22 50%, #1E40AF 50%, #1E40AF 66%, #DC2626 66%, #DC2626 83%, #000 83%, #000 100%);
    height: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-glow {
    transition: all 0.3s ease;
}

.card-glow:hover {
    box-shadow: 0 0 30px rgba(200, 16, 46, 0.2), 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.btn-martial {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-martial::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.btn-martial:hover::after {
    width: 300px;
    height: 300px;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
}

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

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

/* Korean Vertical Text (Static) */
.korean-vertical-text {
    z-index: 1;
}

.korean-char {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    user-select: none;
    filter: blur(0.5px);
    line-height: 1.1;
    transition: all 0.3s ease;
}

.dark .korean-char {
    color: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
    filter: blur(1px);
}

/* Animated Gradient Orbs */
@keyframes orb-move-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -30px) scale(1.1);
    }
    50% {
        transform: translate(0, -50px) scale(1);
    }
    75% {
        transform: translate(-50px, -30px) scale(0.9);
    }
}

@keyframes orb-move-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-40px, 40px) scale(1.2);
    }
    66% {
        transform: translate(40px, 20px) scale(0.9);
    }
}

@keyframes orb-move-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, 30px) scale(1.15);
    }
}

.animated-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.orb-1 {
    animation: orb-move-1 8s ease-in-out infinite;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.25) 0%, transparent 70%);
}

.orb-2 {
    animation: orb-move-2 10s ease-in-out infinite;
    background: radial-gradient(circle, rgba(0, 52, 120, 0.25) 0%, transparent 70%);
}

.orb-3 {
    animation: orb-move-3 12s ease-in-out infinite;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.15) 0%, transparent 70%);
}

.orb-4 {
    animation: orb-move-1 15s ease-in-out infinite reverse;
    background: radial-gradient(circle, rgba(0, 52, 120, 0.15) 0%, transparent 70%);
}

/* Sparkle Effects - Smooth, gentle twinkling */
@keyframes sparkle-smooth {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    20% {
        opacity: 0.8;
        transform: scale(1);
    }
    40% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    80% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.6), 0 0 16px 2px rgba(255, 215, 0, 0.3);
    animation: sparkle-smooth var(--sparkle-duration, 4s) cubic-bezier(0.4, 0, 0.2, 1) infinite;
    will-change: opacity, transform;
}

/* Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.shine-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: skewX(-15deg);
    pointer-events: none;
    animation: shine 8s ease-in-out infinite;
}

/* Pulse glow for main elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(200, 16, 46, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(200, 16, 46, 0.6);
    }
}

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

/* Martial arts icon float */
@keyframes martial-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-10px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translateY(-5px) rotate(-5deg) scale(0.95);
    }
    75% {
        transform: translateY(-15px) rotate(3deg) scale(1.02);
    }
}

.martial-icon {
    animation: martial-float 6s ease-in-out infinite;
}

/* Belt progression animation */
@keyframes belt-fill {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.belt-progression.animated {
    background-size: 1000% 100%;
    animation: belt-fill 2s ease-out forwards;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Navigation Active State */
.nav-link.active {
    color: #C8102E;
    font-weight: 700;
}

.dark .nav-link.active {
    color: #FF4500;
}

/* Back to Top Button */
#back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Toast Notification */
#toast-notification {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.btn-loading .spinner {
    display: inline-block;
}

.btn-loading span {
    display: none;
}

/* Cookie & Modals */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cookie-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 10001;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transition: transform 0.3s;
}

.cookie-modal-overlay.show .cookie-modal {
    transform: translate(-50%, -50%) scale(1);
}

/* Accordion Animation */
.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.accordion-content > div {
    overflow: hidden;
}

.accordion-header[aria-expanded="true"] + .accordion-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e5e7eb;
    border-radius: 24px;
    transition: 0.3s;
    border: 1px solid #d1d5db;
}

.dark .toggle-slider {
    background-color: #374151;
    border-color: #4b5563;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #C8102E, #8B0000);
    border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    background-color: #22c55e;
    opacity: 0.7;
    cursor: not-allowed;
    border-color: transparent;
}