/* ========================================
   Stunt Simulator - Gaming Style CSS
   Vibrant, Exciting, Game-Focused Design
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    --primary: #ff4655;
    --primary-dark: #d63447;
    --secondary: #1a1a2e;
    --accent: #16c79a;
    --gold: #ffd700;
    --text: #fff;
    --text-dark: #1a1a2e;
    --bg-dark: #0f0f1e;
    --bg-card: #1e1e30;
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-lg: 0 15px 60px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #ff4655 0%, #d63447 100%);
    --gradient-secondary: linear-gradient(135deg, #16c79a 0%, #11998e 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-dark);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 70, 85, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(22, 199, 154, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ========== Header ========== */
.header {
    background: var(--gradient-dark);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 70, 85, 0.5);
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav a {
    color: var(--text);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    transition: var(--transition);
}

.nav a:hover::before,
.nav a.active::before {
    width: 80%;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: rgba(255, 70, 85, 0.1);
}

/* ========== Layout ========== */
.main-layout {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* ========== Sidebar ========== */
.sidebar {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(255, 70, 85, 0.2);
}

.sidebar h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar h3::before {
    content: '🎮';
    font-size: 1.5rem;
}

.sidebar-games {
    list-style: none;
}

.sidebar-games li {
    margin-bottom: 0.5rem;
}

.sidebar-games a {
    color: var(--text);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.sidebar-games a::before {
    content: '▶';
    color: var(--accent);
    font-size: 0.8rem;
    transition: var(--transition);
}

.sidebar-games a:hover,
.sidebar-games a.active {
    background: var(--gradient-primary);
    transform: translateX(5px);
    border-color: var(--primary);
}

.sidebar-games a:hover::before {
    transform: translateX(3px);
}

.sidebar-category {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 70, 85, 0.2);
}

.sidebar-category h4 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== Main Content ========== */
.main-content {
    min-height: 80vh;
}

/* ========== Hero Section ========== */
.hero {
    background: var(--gradient-primary);
    color: var(--text);
    padding: 3rem 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ========== Game Wrapper ========== */
.game-wrapper {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 70, 85, 0.2);
}

.game-wrapper h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 62.5%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 3px solid var(--primary);
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: var(--text);
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 70, 85, 0.6);
}

.btn-secondary {
    background: var(--gradient-secondary);
    box-shadow: 0 4px 15px rgba(22, 199, 154, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 6px 25px rgba(22, 199, 154, 0.6);
}

/* ========== Content Section ========== */
.content-section {
    background: var(--bg-card);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 70, 85, 0.2);
}

.content-section h2 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.content-section h3 {
    color: var(--accent);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-section p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.content-section ul,
.content-section ol {
    margin-left: 2rem;
    margin-bottom: 1.2rem;
}

.content-section li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.content-section strong {
    color: var(--accent);
    font-weight: 700;
}

.highlight {
    background: linear-gradient(120deg, rgba(255, 70, 85, 0.2) 0%, rgba(255, 70, 85, 0.3) 100%);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary);
}

/* ========== Game Grid ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.game-card:hover::before {
    opacity: 0.1;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover img {
    transform: scale(1.1);
}

.game-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.game-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

.game-card .play-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
}

/* ========== FAQ ========== */
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.8rem;
    background: rgba(255, 70, 85, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.faq-item:hover {
    background: rgba(255, 70, 85, 0.1);
    transform: translateX(5px);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.faq-item p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

/* ========== Footer ========== */
.footer {
    background: var(--gradient-dark);
    color: var(--text);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 2px solid var(--primary);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(3px);
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 70, 85, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

/* ========== Utility Classes ========== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .main-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-wrapper {
        padding: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== Loading State ========== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 70, 85, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
