/* ============================================
   SEMICOLON TOOLS — GLOBAL STYLE (FONT BESAR)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ===== RESET & GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 15px;
    line-height: 2;
    background: #1a0a2e;
    color: #FFFFFF;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    height: 100vh;
    image-rendering: pixelated;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #1a0a2e;
}
::-webkit-scrollbar-thumb {
    background: #e52521;
    border: 3px solid #fbd000;
}

/* ===== SNOW ===== */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    opacity: 0;
    animation: fall linear infinite;
    pointer-events: none;
    font-size: 22px;
}

@keyframes fall {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
    }
}

/* ===== MUSIC BUTTON ===== */
#musicBtn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.55rem !important;
}

#musicBtn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

#musicBtn:hover::after {
    transform: scale(1);
}

#musicBtn.playing {
    border-bottom-color: #00ff41 !important;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a0a2e, #2d1b4e);
    border-right: 4px solid #fbd000;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    text-align: center;
    padding: 0 20px 20px 20px;
    border-bottom: 4px solid #fbd000;
    margin-bottom: 16px;
}

.sidebar-logo img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border: 4px solid #fbd000;
    image-rendering: pixelated;
}

.sidebar-logo .brand {
    font-size: 0.9rem;
    color: #fbd000;
    text-shadow: 3px 3px 0 #e52521;
    margin-top: 10px;
    display: block;
}

.sidebar-logo .brand span {
    color: #e52521;
    text-shadow: 3px 3px 0 #fbd000;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #a8a0b8;
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border-right: none;
    border-top: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
    font-family: 'Press Start 2P', monospace;
    line-height: 1.6;
}

.menu-item:hover {
    background: rgba(229, 37, 33, 0.15);
    color: #ffffff;
    border-left-color: #fbd000;
}

.menu-item.active {
    background: rgba(229, 37, 33, 0.25);
    color: #fbd000;
    border-left-color: #e52521;
}

.menu-divider {
    height: 2px;
    background: repeating-linear-gradient(90deg, #e52521, #fbd000, #e52521);
    margin: 10px 20px;
}

.menu-label {
    padding: 8px 24px;
    font-size: 0.5rem;
    color: #fbd00055;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
    position: relative;
    z-index: 1;
    background: radial-gradient(ellipse at center, #2d1b4e, #1a0a2e);
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #fbd00033;
    flex-wrap: wrap;
}

.top-item {
    font-size: 0.5rem;
    color: #a8a0b8;
    background: #1a0a2e;
    padding: 8px 18px;
    border: 2px solid #2d1b4e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-item .dot {
    width: 10px;
    height: 10px;
    background: #00ff41;
    animation: blink 1.5s ease-in-out infinite;
    border: 1px solid #00ff4166;
}

.top-item .clock {
    color: #fbd000;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ===== HOME HERO ===== */
.home-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    padding: 20px 30px 20px 30px;
    animation: fadeInUp 0.6s ease;
    overflow-y: auto;
}

.home-hero .icon {
    font-size: 4.5rem;
    margin-bottom: 10px;
    animation: bounceMario 1.5s ease-in-out infinite;
}

@keyframes bounceMario {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.home-hero h1 {
    font-size: 2.5rem;
    color: #fbd000;
    text-shadow: 5px 5px 0 #e52521;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.home-hero h1 span {
    color: #e52521;
    text-shadow: 5px 5px 0 #fbd000;
}

.home-hero .tagline {
    font-size: 0.75rem;
    color: #a8a0b8;
    max-width: 600px;
    line-height: 2.2;
    margin-bottom: 8px;
}

.home-hero .sub {
    font-size: 0.5rem;
    color: #fbd00055;
}

/* ===== STATS ===== */
.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 700px;
    width: 100%;
    margin: 20px auto 0;
}

.home-stats .stat-item {
    background: #1a0a2e;
    border: 3px solid #fbd000;
    padding: 18px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.home-stats .stat-item:hover {
    border-color: #e52521;
    transform: translateY(-3px);
}

.home-stats .stat-item .num {
    font-size: 2rem;
    color: #fbd000;
    text-shadow: 3px 3px 0 #e52521;
    display: block;
}

.home-stats .stat-item .label {
    font-size: 0.6rem;
    color: #a8a0b8;
    margin-top: 8px;
    display: block;
}

/* ===== QUICK ACCESS ===== */
.home-quick {
    max-width: 700px;
    width: 100%;
    margin: 20px auto 0;
}

.home-quick .search-box {
    width: 100%;
    padding: 16px 20px;
    font-size: 0.6rem;
    font-family: 'Press Start 2P', monospace;
    background: #1a0a2e;
    border: 3px solid #fbd000;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.home-quick .search-box:focus {
    border-color: #e52521;
}

.home-quick .search-box::placeholder {
    color: #a8a0b855;
}

.home-quick .quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.home-quick .quick-btn {
    padding: 16px 10px;
    background: #1a0a2e;
    border: 3px solid #2d1b4e;
    color: #a8a0b8;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
    line-height: 1.6;
}

.home-quick .quick-btn:hover {
    border-color: #fbd000;
    color: #fbd000;
    transform: scale(1.02);
}

.home-quick .quick-btn .qicon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 6px;
}

/* ===== STATUS ===== */
.home-status {
    max-width: 700px;
    width: 100%;
    margin: 20px auto 0;
}

.home-status .title {
    font-size: 0.5rem;
    color: #a8a0b8;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.home-status .status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.home-status .status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #1a0a2e;
    border: 2px solid #2d1b4e;
    font-size: 0.55rem;
    color: #a8a0b8;
    transition: all 0.3s ease;
}

.home-status .status-item:hover {
    border-color: #fbd00044;
}

.home-status .status-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border: 2px solid #1a0a2e;
}

.home-status .status-dot.online {
    background: #00ff41;
}
.home-status .status-dot.maintenance {
    background: #fbd000;
}
.home-status .status-dot.offline {
    background: #e52521;
}

/* ===== GAME CONTAINER ===== */
#gameContainer {
    position: relative;
    width: 100%;
    max-width: 848px;
    aspect-ratio: 848 / 509;
    margin: 20px auto 0;
    border: 4px solid #fbd000;
    border-radius: 8px;
    background: #0a0515;
    box-shadow: 0 0 40px rgba(251, 208, 0, 0.15);
    flex-shrink: 0;
    overflow: hidden;
}

#gameContainer .game-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(180deg, #fbd000, #e52521);
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    height: 38px;
}

#gameContainer .game-header .title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: #1a0a2e;
}

#gameContainer .game-header .btn-group {
    display: flex;
    gap: 6px;
}

#gameContainer .game-header .btn-group button {
    background: #1a0a2e;
    border: none;
    padding: 4px 14px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.35rem;
    cursor: pointer;
    border-bottom: 2px solid #fbd00044;
    transition: all 0.2s ease;
}

#gameContainer .game-header .btn-group .btn-toggle {
    color: #fbd000;
}

#gameContainer .game-header .btn-group .btn-close {
    color: #e52521;
    border-bottom-color: #e5252144;
}

#gameContainer .game-header .btn-group button:hover {
    transform: scale(1.05);
}

#gameContainer iframe {
    position: absolute;
    top: 38px;
    left: 0;
    width: 100%;
    height: calc(100% - 38px);
    border: none;
    background: #0a0515;
}

/* ===== CREATED ===== */
.home-created {
    margin-top: 20px;
    font-size: 0.5rem;
    color: #a8a0b8;
    letter-spacing: 2px;
}

.home-created span {
    color: #e52521;
    font-weight: 700;
}

.home-created .semicolon {
    color: #fbd000;
}

/* ===== FOOTER ===== */
footer {
    margin-top: auto;
    padding-top: 16px;
    overflow: hidden;
    border-top: 2px solid #fbd00022;
    flex-shrink: 0;
}

.marquee {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    padding: 8px 0;
    position: relative;
}

.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(90deg, #1a0a2e, transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(270deg, #1a0a2e, transparent);
}

.marquee-track {
    display: inline-block;
    animation: marqueeScroll 20s linear infinite;
    font-size: 0.45rem;
    color: #a8a0b855;
    letter-spacing: 2px;
}

.marquee-track span {
    color: #e52521;
}

.marquee-track .star {
    color: #fbd00055;
    margin: 0 10px;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    background: #1a0a2e;
    border: 3px solid #fbd000;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 1.4rem;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
}

.hamburger:hover {
    background: #e52521;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #00000088;
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    #gameContainer {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .hamburger {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 16px 20px;
    }

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

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

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

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

    .home-hero .tagline {
        font-size: 0.65rem;
    }

    .top-bar {
        justify-content: center;
    }

    .top-item {
        font-size: 0.4rem;
        padding: 6px 12px;
    }

    #gameContainer .game-header .title {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 11px;
    }

    .main-content {
        padding: 12px 14px;
    }

    .home-hero h1 {
        font-size: 1.2rem;
        text-shadow: 3px 3px 0 #e52521;
    }

    .home-hero .tagline {
        font-size: 0.5rem;
    }

    .home-hero .icon {
        font-size: 3rem;
    }

    .home-stats {
        gap: 8px;
    }

    .home-stats .stat-item .num {
        font-size: 1.2rem;
    }

    .home-stats .stat-item .label {
        font-size: 0.4rem;
    }

    .home-status .status-item {
        font-size: 0.4rem;
        padding: 6px 10px;
    }

    .home-quick .quick-btn {
        font-size: 0.4rem;
        padding: 12px 6px;
    }

    .home-quick .quick-btn .qicon {
        font-size: 1.2rem;
    }

    .menu-item {
        padding: 10px 16px;
        font-size: 0.55rem;
    }

    #gameContainer .game-header .title {
        font-size: 0.3rem;
    }

    #gameContainer .game-header .btn-group button {
        font-size: 0.25rem;
        padding: 2px 10px;
    }
}
