/* CSS Custom Properties */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
}

/* Global Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #764ba2 50%, #667eea 75%, #f093fb 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.95);
    transition: background 0.3s ease, color 0.3s ease;
}



/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 100px 100px, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 200px 300px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 400px 200px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 300px 400px, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 500px 150px, rgba(255,255,255,0.05), transparent);
    animation: particles 20s infinite linear;
    pointer-events: none;
    z-index: -1;
}

@keyframes particles {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-15px); }
    75% { transform: translateY(-30px) translateX(5px); }
    100% { transform: translateY(0) translateX(0); }
}

html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar {
    background-color: rgba(13, 110, 253, 0.1) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background-color: rgba(13, 110, 253, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* Text colors for glass cards */
.text-white-75 {
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.6;
}

.section {
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    padding: 100px 0 50px;
    position: relative;
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.hero-content .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Hero Games Grid Styles */
.hero-games-grid {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.game-preview-img {
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-preview-img:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.game-preview-img:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

/* Game Container Styles */
.game-container-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.game-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.game-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    z-index: 2;
}

.game-container.loading iframe {
    opacity: 0;
}

/* Game container focus effect when selected from showcase */
.game-container.focused {
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.1),
        0 0 30px rgba(13, 110, 253, 0.6) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.game-info h4 {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.btn-outline-light:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

/* Game Showcase Section - Transparent Background */
#game-showcase {
    background: transparent !important;
    position: relative;
}

.game-covers-showcase {
    padding: 15px 0;
}

.game-cover-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.2),
        0 0 0 1px rgba(255,255,255,0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.game-cover-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.game-cover-item:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

.game-cover-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-cover-item:hover .game-cover-img {
    transform: scale(1.05);
}

.game-cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px 12px 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.game-cover-item:hover .game-cover-overlay {
    transform: translateY(0);
}

.game-cover-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.game-cover-overlay .btn {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 15px;
    background: #0d6efd;
    border: none;
    transition: all 0.3s ease;
}

.game-cover-overlay .btn:hover {
    background: #0b5ed7;
    transform: scale(1.05);
}

/* Section Styles */
section {
    scroll-margin-top: 76px;
    position: relative;
}

/* Main sections - Transparent background for seamless continuity */
#what-is, #how-to, #why {
    background: transparent !important;
    position: relative;
}

/* Ensure no Bootstrap background classes override our settings */
section.bg-light, section.bg-primary, section.bg-dark, section.bg-secondary {
    background: transparent !important;
}

.display-5 {
    font-weight: 700;
    letter-spacing: -1px;
}

/* Card Styles */
.card {
    border: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon i {
    margin-bottom: 1rem;
}

.card:hover .feature-icon i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Step Styles */
.step-card {
    padding: 2rem 1rem;
}

.step-number .badge {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.step-content h5 {
    margin-top: 1.5rem;
    font-weight: 600;
}

/* Why Section */
#why .fs-1 {
    font-size: 3rem !important;
}

/* Footer */
footer {
    background: var(--primary-color);
}

footer h5, footer h6 {
    font-weight: 600;
}

footer .social-links a {
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: #ffc107 !important;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .game-container {
        padding-bottom: 60%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 991px) {
    .game-cover-img {
        height: 120px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section {
        padding: 60px 0 40px;
        min-height: 90vh;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .game-info .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .step-number .badge {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .step-card {
        padding: 1.5rem 0.5rem;
    }
    
    #why .fs-1 {
        font-size: 2.5rem !important;
    }
    
    .glass-card {
        padding: 1.5rem;
        margin: 0 15px;
    }
}

@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .game-container {
        padding-bottom: 66.67%; /* 3:2 aspect ratio for mobile */
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .step-number .badge {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .game-cover-img {
        height: 90px;
    }
    
    .game-cover-title {
        font-size: 0.8rem;
    }
    
    .game-cover-overlay .btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Loading Animation */
.game-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-container.loading .game-loading {
    display: flex !important;
}

.game-container:not(.loading) .game-loading {
    display: none;
}

.game-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    padding: 20px;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Fullscreen Styles */
.fullscreen-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.fullscreen-game iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
}

.border-radius-lg {
    border-radius: 15px !important;
}

.border-radius-xl {
    border-radius: 20px !important;
}

/* FAQ Section Styles */
#faq .accordion-button {
    padding: 1.5rem;
    font-size: 1.1rem;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#faq .accordion-button:not(.collapsed) {
    background: rgba(13, 110, 253, 0.1);
    color: #fff;
}

#faq .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    filter: brightness(0) invert(1);
}

#faq .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d6efd'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

#faq .accordion-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

#faq .glass-card {
    transition: all 0.3s ease;
}

#faq .glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* FAQ Icons Animation */
#faq .accordion-button i {
    transition: transform 0.3s ease, color 0.3s ease;
}

#faq .accordion-button:not(.collapsed) i {
    transform: scale(1.1);
    color: #0d6efd !important;
}

/* Contact CTA in FAQ */
#faq .btn-primary {
    background: linear-gradient(45deg, #0d6efd, #6610f2);
    border: none;
    transition: all 0.3s ease;
}

#faq .btn-primary:hover {
    background: linear-gradient(45deg, #0b5ed7, #520dc2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

/* Responsive FAQ Styles */
@media (max-width: 768px) {
    #faq .accordion-button {
        padding: 1rem;
        font-size: 1rem;
    }
    
    #faq .accordion-body {
        padding: 0 1rem 1rem 1rem;
        font-size: 0.9rem;
    }
    
    #faq .glass-card {
        margin-bottom: 1rem !important;
    }
}



/* Showcase Title - Typewriter + Rainbow + Magnetic Effects */
.showcase-title {
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #0d6efd;
    width: 0;
    animation: typing 3s steps(25, end) forwards, blink-caret 0.8s step-end infinite;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.showcase-title.typing-complete {
    border-right: none;
    white-space: normal;
    width: auto;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease-in-out infinite;
}

.showcase-title.typing-complete:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 20px rgba(13, 110, 253, 0.6))
            drop-shadow(0 0 40px rgba(111, 66, 193, 0.4))
            drop-shadow(0 0 60px rgba(255, 119, 198, 0.3));
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.showcase-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.8s ease-out 1s forwards;
}

.showcase-stats {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease-out 1.3s forwards;
}

/* Pulse Animation for Badges */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* Typewriter Animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #0d6efd; }
}

/* Rainbow Gradient Animation */
@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Slide In Down Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Up Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Game Covers - Static, No Floating */
.game-cover-item {
    /* Removed floating animation - covers are now static */
}

/* Glow Effect - Now integrated into .typing-complete:hover */

/* Badge Hover Effects */
.badge {
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .showcase-title {
        font-size: 1.8rem !important;
        animation: typing 4s steps(20, end) forwards, blink-caret 0.8s step-end infinite;
    }
    
    .showcase-title.typing-complete:hover {
        transform: scale(1.05); /* Smaller scale on mobile */
    }
    
    .showcase-subtitle {
        font-size: 1rem !important;
    }
    
    .showcase-stats .badge {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .showcase-title {
        font-size: 1.5rem !important;
        animation: typing 5s steps(15, end) forwards, blink-caret 0.8s step-end infinite;
    }
    
    .showcase-title.typing-complete {
        white-space: normal; /* Allow text wrapping on very small screens */
    }
} 