/* Truth or Dare - Custom Styles */

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* Note: overflow-x:hidden is used to prevent horizontal scrolling from parallax effects */
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== Card Preview Styles ===== */
.card-preview {
    width: 140px;
    height: 200px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    /* Support for parallax offset */
    transform: translateY(var(--parallax-offset, 0px));
}

.card-preview:hover {
    transform: translateY(calc(var(--parallax-offset, 0px) - 10px)) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.truth-card {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.dare-card {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
}

.extreme-card {
    background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
}

/* ===== Mode Cards ===== */
.mode-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mode-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.mode-card:hover .mode-icon {
    transform: scale(1.2) rotate(5deg);
}

.mode-features {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.premium-mode {
    position: relative;
}

.premium-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ===== Category Cards ===== */
.category-card {
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.premium-category {
    border: 2px solid rgba(251, 191, 36, 0.5);
}

/* ===== Scenario Cards ===== */
.scenario-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.scenario-image {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.scenario-card:hover .scenario-image {
    transform: scale(1.05);
}

/* ===== Feature Boxes ===== */
.feature-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

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

/* ===== Smooth Scrolling ===== */
section {
    scroll-margin-top: 80px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .card-preview {
        width: 100px;
        height: 140px;
    }

    .mode-card {
        padding: 24px;
    }

    .category-card {
        padding: 24px 16px;
    }

    .scenario-image {
        height: 150px;
    }
}

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

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

/* ===== Button Hover Effects ===== */
a[href^="#"] {
    transition: all 0.3s ease;
}

a[href^="#"]:hover {
    text-decoration: none;
}

/* ===== Loading Animation ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #ec4899 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #db2777 100%);
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* ===== Focus Styles ===== */
a:focus,
button:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

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

/* ===== Header Scrolled State ===== */
header.scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Section Fade-In Animation ===== */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Toast Notification ===== */
.toast-notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    font-size: 1rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
}

/* ===== Ripple Effect ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Print Styles ===== */
@media print {
    header,
    footer,
    .cta-section {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }
}
