/* ═══════════════════════════════════════
   FUTURE STARS — GLOBAL ANIMATIONS
   ═══════════════════════════════════════ */

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

/* Selection Color */
::selection {
    background: rgba(201,162,39,0.3);
    color: var(--white);
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* Scroll Progress Bar */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    z-index: 9999;
    transition: width 0.1s;
    width: 0%;
}

/* Fade In Up */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Staggered Children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Stat Pulse Glow */
@keyframes statPulse {
    0%, 100% { text-shadow: 0 0 5px rgba(201,162,39,0.2); }
    50% { text-shadow: 0 0 20px rgba(201,162,39,0.5), 0 0 40px rgba(201,162,39,0.2); }
}
.stat-pulse {
    animation: statPulse 3s ease-in-out infinite;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(201,162,39,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* 3D Button */
.btn-3d {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    border: none;
    border-bottom: 4px solid var(--gold-dark);
    border-radius: 12px;
    color: var(--black);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    padding: 14px 28px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 20px rgba(201,162,39,0.3);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}
.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201,162,39,0.4);
}
.btn-3d:active {
    transform: translateY(2px);
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 2px 10px rgba(201,162,39,0.2);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    border-radius: 10px;
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-secondary:hover {
    background: rgba(201,162,39,0.1);
    transform: translateY(-2px);
}

/* Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(201,162,39,0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

/* Card Hover Lift */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(201,162,39,0.15), 0 0 0 1px rgba(201,162,39,0.1);
    border-color: rgba(201,162,39,0.3);
}

/* Glow Border Animation */
@keyframes glowBorder {
    0%, 100% { border-color: rgba(201,162,39,0.2); }
    50% { border-color: rgba(201,162,39,0.5); }
}
.nav-glow {
    animation: glowBorder 2s ease-in-out infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--black-card) 25%, rgba(201,162,39,0.05) 50%, var(--black-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: var(--black-card);
    border: 1px solid var(--gold);
    border-radius: 12px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    z-index: 10000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
@keyframes toastIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100px); opacity: 0; }
}

/* Modal Backdrop Blur */
.modal-backdrop {
    backdrop-filter: blur(8px);
}

/* Input Focus Glow */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--black-light);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-dark);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Print Styles */
@media print {
    .header, .nav, .logout-btn, .controls, .btn, .trip-actions, .folder-actions, .modal-overlay, .particles, .progress-bar, #theme-toggle { display: none !important; }
    body { background: white !important; color: black !important; }
    .main { padding: 20px !important; max-width: 100% !important; }
    .plan-card, .trip-card, .folder-card, .tournament-card { break-inside: avoid; border: 1px solid #ddd !important; box-shadow: none !important; }
    .welcome { color: #000 !important; }
    .subtitle { color: #666 !important; }
    .detail-view { border: 1px solid #ddd !important; }
    a { text-decoration: none !important; color: #000 !important; }
    .detail-title { color: #000 !important; }
    .total-price { color: #000 !important; }
    .cost-value { color: #000 !important; }
    .plan-card-title { color: #000 !important; }
    .info-card { border: 1px solid #ddd !important; }
}

/* Light Mode */
[data-theme="light"] {
    --black: #F5F5F0;
    --black-light: #E8E8E0;
    --black-card: #FFFFFF;
    --black-hover: #F0F0E8;
    --white: #1A1A1A;
    --gray: #5A5A5A;
    --gray-dark: #8A8A8A;
    --border: #D0D0C8;
}
[data-theme="light"] body {
    background: var(--black);
    color: var(--white);
}
[data-theme="light"] .particle {
    background: var(--gold-dark);
}
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--black-light);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--gray-dark);
}

/* Theme Toggle Button */
#theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--black-card);
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 1.4em;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
}
#theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--gold);
}

/* Responsive Typography */
@media (max-width: 768px) {
    html { font-size: 14px; }
    #theme-toggle { bottom: 20px; left: 20px; width: 40px; height: 40px; font-size: 1.2em; }
}
@media (max-width: 480px) {
    html { font-size: 13px; }
}
