/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0a0e27;
    --secondary-bg: #151932;
    --card-bg: #1e2439;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: #a1a8c1;
    --border-color: #2d3553;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --game-cover-image: url('images/steal-a-brainrot-online.png');
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #1a1f3a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #000;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 28px;
    color: #FED000;
    letter-spacing: 1px;
}

.keywords {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.keyword-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FED000;
    transform: translateY(-2px);
}

/* Main Content Layout */
.main-content {
    padding: 30px 0;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

/* Left Ad Space */
.left-ad {
    display: none;
}

.ad-placeholder {
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.ad-placeholder p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.ad-placeholder span {
    font-size: 14px;
    opacity: 0.7;
}

/* Game Area */
.game-area {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.play-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.play-btn:active {
    transform: translateY(-1px);
}

.play-icon {
    font-size: 18px;
}

.game-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 24px;
    color: #4a5568;
    transition: color 0.3s ease;
}

.star.filled {
    color: var(--warning-yellow);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.star.half {
    background: linear-gradient(90deg, var(--warning-yellow) 50%, #4a5568 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--warning-yellow);
}

.fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
    transform: scale(1.1);
}

/* Game Container */
.game-container {
    width: 100%;
    height: 600px;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.game-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: #050505;
}

.game-placeholder::before {
    content: '';
    position: absolute;
    inset: -20px;
    background-image: var(--game-cover-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    z-index: 0;
}

.game-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 0;
}

.placeholder-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 40px 50px;
    width: min(420px, 90%);
    border-radius: 40px;
    background: rgba(12, 16, 32, 0.75);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cover-wrapper {
    padding: 8px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.game-cover {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 28px;
    display: block;
}

.placeholder-play-btn {
    border: none;
    padding: 16px 50px;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    background: #0c0f24;
    color: #ffd447;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 240px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), 0 15px 30px rgba(0, 0, 0, 0.6);
}

.placeholder-play-btn .play-toggle {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: white;
    display: inline-block;
    position: relative;
}

.placeholder-play-btn .play-toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0c0f24;
    top: 4px;
    left: 5px;
    transition: transform 0.3s ease;
}

.placeholder-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.3), 0 25px 35px rgba(0, 0, 0, 0.6);
}

.placeholder-play-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), 0 15px 25px rgba(0, 0, 0, 0.4);
}

#gameFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.game-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
}

/* Related Games */
.related-games {
    display: none;
    position: sticky;
    top: 20px;
}

.related-games h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--accent-purple);
    text-align: center;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
}

.game-thumb {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

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

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

.game-title {
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}

/* Game Info Section */
.game-info {
    padding: 50px 0;
    background: var(--secondary-bg);
    margin-top: 30px;
}

.info-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.info-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.info-card h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 10px;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.info-card strong {
    color: var(--text-primary);
}

.info-card em {
    color: var(--accent-pink);
}

.game-details {
    display: none;
}

.gameplay-list {
    list-style: none;
}

.gameplay-list li {
    padding: 12px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.gameplay-list li:last-child {
    border-bottom: none;
}

.gameplay-list li:hover {
    color: var(--text-primary);
    padding-left: 10px;
}

.game-tag {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px 6px 4px 0;
    background: rgba(254, 208, 0, 0.15);
    border: 1px solid #FED000;
    border-radius: 15px;
    font-size: 13px;
    color: #FED000;
    font-weight: 500;
    transition: all 0.3s ease;
}

.game-tag:hover {
    background: rgba(254, 208, 0, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 208, 0, 0.3);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--primary-bg);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-layout {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .related-games {
        position: static;
        margin-top: 20px;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .brand {
        justify-content: center;
    }

    .logo h1 {
        font-size: 22px;
    }

    .game-container {
        height: 400px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .play-btn {
        font-size: 16px;
        padding: 12px 30px;
    }

    .game-controls {
        justify-content: center;
    }

    .placeholder-card {
        padding: 30px;
        width: 90%;
    }

    .placeholder-play-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .game-area {
        padding: 15px;
    }

    .game-container {
        height: 300px;
    }

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

    .keyword-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}
