:root {
    --bg-color: #0d0f12;
    --card-bg: rgba(20, 24, 30, 0.7);
    --text-main: #f0f4f8;
    --text-muted: #8b9eb0;
    --accent-color: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --flashback-cyan: #0ff;
    --flashback-pink: #f0f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Header & Typography */
h1,
h2,
h3,
.glitch-text,
.coming-soon-text {
    font-family: 'Orbitron', 'Noto Sans JP', sans-serif;
}

.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 10;
}

.portal-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.portal-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Background Particles Effect */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at top, rgba(0, 50, 80, 0.2) 0%, transparent 60%);
}

.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

/* Layout & Grid */
.games-showcase {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 10;
}

/* Game Card Styles (Glassmorphism) */
.game-card {
    display: flex;
    flex-direction: row;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-glow);
    border-color: rgba(0, 240, 255, 0.3);
}

/* Card Visuals (Left Side) */
.card-visual {
    width: 45%;
    min-height: 250px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Specific Theme: Flashback Runner */
.flashback-theme {
    background: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.flashback-theme::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    transform: perspective(300px) rotateX(45deg);
    animation: gridMoveSmall 10s linear infinite;
    z-index: 1;
}

@keyframes gridMoveSmall {
    0% {
        transform: perspective(300px) rotateX(45deg) translateY(0);
    }

    100% {
        transform: perspective(300px) rotateX(45deg) translateY(20px);
    }
}

.glitch-text {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    position: relative;
    z-index: 2;
    text-align: center;
    display: block;
    line-height: 1.2;
    text-shadow: 2px 0 var(--flashback-pink), -2px 0 var(--flashback-cyan);
    animation: subtleGlitch 2s infinite;
}

@keyframes subtleGlitch {

    0%,
    100% {
        text-shadow: 2px 0 var(--flashback-pink), -2px 0 var(--flashback-cyan);
    }

    50% {
        text-shadow: -2px 0 var(--flashback-pink), 2px 0 var(--flashback-cyan);
    }
}

/* Placeholder Themes */
.placeholder-theme {
    background: linear-gradient(135deg, #1a1e24 0%, #0d0f12 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.placeholder-theme-alt {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #161a20 10px, #161a20 20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.coming-soon-text {
    font-size: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    opacity: 0.5;
}

/* Card Details (Right Side) */
.card-details {
    width: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-details h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.tag.disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-details p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Buttons */
.card-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    cursor: not-allowed;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive constraints */
@media (max-width: 900px) {
    .game-card {
        flex-direction: column;
    }

    .card-visual,
    .card-details {
        width: 100%;
    }

    .card-visual {
        min-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .card-details {
        padding: 30px 20px;
    }

    .card-actions {
        flex-direction: column;
    }
}

/* Specific Theme: Flashback Runner */
.flashback-theme {
    background: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.flashback-theme::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    transform: perspective(300px) rotateX(45deg);
    animation: gridMoveSmall 10s linear infinite;
    z-index: 1;
}

@keyframes gridMoveSmall {
    0% {
        transform: perspective(300px) rotateX(45deg) translateY(0);
    }

    100% {
        transform: perspective(300px) rotateX(45deg) translateY(20px);
    }
}

.glitch-text {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    position: relative;
    z-index: 2;
    text-align: center;
    display: block;
    line-height: 1.2;
    text-shadow: 2px 0 var(--flashback-pink), -2px 0 var(--flashback-cyan);
    animation: subtleGlitch 2s infinite;
}

@keyframes subtleGlitch {

    0%,
    100% {
        text-shadow: 2px 0 var(--flashback-pink), -2px 0 var(--flashback-cyan);
    }

    50% {
        text-shadow: -2px 0 var(--flashback-pink), 2px 0 var(--flashback-cyan);
    }
}

/* Placeholder Themes */
.placeholder-theme {
    background: linear-gradient(135deg, #1a1e24 0%, #0d0f12 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.placeholder-theme-alt {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #161a20 10px, #161a20 20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.coming-soon-text {
    font-size: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    opacity: 0.5;
}

/* Card Details (Right Side) */
.card-details {
    width: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-details h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.tag.disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-details p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Buttons */
.card-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    cursor: not-allowed;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive constraints */
@media (max-width: 900px) {
    .game-card {
        flex-direction: column;
    }

    .card-visual,
    .card-details {
        width: 100%;
    }

    .card-visual {
        min-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .card-details {
        padding: 30px 20px;
    }

    .card-actions {
        flex-direction: column;
    }
}

/* AdSense Placeholder Styles */
.adsense-placeholder {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.adsense-placeholder.bottom {
    margin: 0 auto 40px;
}

.adsense-placeholder-text {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family:
        \Orbitron\', sans-serif;
}

@media (max-width: 768px) {
    .adsense-placeholder {
        max-width: 320px;
        min-height: 50px;
    }
}

/* Glass Card & Text Content for Policy/Contact/About */
.glass-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.text-content h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
    margin-top: 30px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 10px;
}

.text-content h2:first-child {
    margin-top: 0;
}

.text-content p {
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Footer Links */
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Ofuse Floating Button */
.ofuse-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff4081, #ff79b0);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 64, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.ofuse-floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 64, 129, 0.6);
    color: white;
}

.ofuse-icon {
    font-size: 1.2rem;
}