/* =========================
   GLOBAL / BASE
========================= */
body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: monospace;
    color: #0F0;
    background: black;
}

/* =========================
   MATRIX CANVAS
========================= */
#matrixCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 0;
    pointer-events: none;
}

/* =========================
   POPUP OVERLAY (FIXED)
========================= */
#urlPopup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);

    justify-content: center;
    align-items: center;

    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;
}

/* =========================
   POPUP CONTENT
========================= */
.popupContent {
    width: min(1200px, 100%);
    height: min(95vh, 100%);

    display: flex;
    flex-direction: column;

    background: rgba(0,0,0,0.95);
    border-radius: 12px;
    overflow: hidden;
    position: relative;

    box-shadow:
        0 0 20px #0F0,
        0 0 60px rgba(0,255,0,0.4),
        inset 0 0 10px rgba(0,255,0,0.2);
}

/* iframe FIX (important) */
.popupContent iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* CLOSE BUTTON */
#closePopup {
    position: absolute;
    top: 10px;
    right: 15px;

    font-size: 1.8rem;
    color: #0F0;
    cursor: pointer;

    z-index: 20;

    background: rgba(0,0,0,0.6);
    padding: 4px 10px;
    border-radius: 6px;
}

/* =========================
   CARD
========================= */
.card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: rgba(0, 0, 0, 0.75);
    border: 2px solid #0F0;
    padding: 60px 90px;
    text-align: center;
    border-radius: 12px;

    box-shadow: 0 0 25px #0F0;
    max-width: 90%;
    z-index: 10;
}

.card h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    white-space: nowrap;
}

.card p {
    font-size: 1.2rem;
    margin-top: 60px;
    margin-bottom: 15px;
    opacity: 0.85;
}

/* =========================
   BUTTONS
========================= */
#urlShortBtn,
#MatrixSnake,
#MatrixSudoku,
#MatrixTetris,
#MatrixRabbitHunt,
#MatrixBubbleShooter {
    background: rgba(0,0,0,0.3);
    color: #0F0;
    border: 2px solid #0F0;

    padding: 8px 20px;
    font-size: 0.95rem;
    border-radius: 5px;

    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;

    box-shadow: 0 0 5px #0F0, 0 0 5px #0F0 inset;
    transition: all 0.25s ease-in-out;
}

#urlShortBtn:hover,
#MatrixSnake:hover,
#MatrixSudoku:hover,
#MatrixTetris:hover,
#MatrixRabbitHunt:hover,
#MatrixBubbleShooter:hover {
    color: #fff;
    background: rgba(0,255,0,0.25);

    box-shadow:
        0 0 25px #0F0,
        0 0 50px #0F0 inset,
        0 0 70px #0F0;

    transform: scale(1.06);
}

#urlShortBtn:active,
#MatrixSnake:active,
#MatrixSudoku:active,
#MatrixTetris:active,
#MatrixRabbitHunt:active,
#MatrixBubbleShooter:active {
    transform: scale(0.95);
}

/* =========================
   FOOTER
========================= */
footer {
    position: fixed;
    bottom: 15px;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================
   TOAST (COOKIE 🍪)
========================= */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    z-index: 99999;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #0F0;
    color: #0F0;

    padding: 12px;
    border-radius: 6px;

    box-shadow: 0 0 15px #0F0;
    font-size: 13px;

    backdrop-filter: blur(4px);

    display: flex;
    flex-direction: column;
    gap: 8px;

    animation: fadeIn 0.3s ease;
}

/* TOAST BUTTON */
.toast-action {
    align-self: flex-end;

    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.6);

    border: 1px solid #0F0;
    border-radius: 4px;

    color: #0F0;
    cursor: pointer;

    font-size: 12px;
    font-family: monospace;

    box-shadow: 0 0 6px #0F0, 0 0 6px #0F0 inset;
    transition: all 0.2s ease;
}

.toast-action:hover {
    color: #fff;
    background: rgba(0, 255, 0, 0.2);

    box-shadow:
        0 0 15px #0F0,
        0 0 25px #0F0 inset;

    transform: scale(1.05);
}

.toast-action:active {
    transform: scale(0.95);
    box-shadow: 0 0 8px #0F0 inset;
}

/* =========================
   RESPONSIVE FIXES
========================= */
@media (max-width: 768px) {
    .card {
        padding: 30px 20px;
        max-width: 95%;
    }

    .popupContent {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

@media (max-width: 400px) {
    #urlPopup {
        padding: 0;
    }
}

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