:root {
    --bg-color: #050505;
    --terminal-green: #0F0;
    --glow-color: rgba(0, 255, 0, 0.5);
}

body {
    background-color: var(--bg-color);
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    text-transform: uppercase;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* --- MAIN CONTENT --- */
#matrixCanvas {
    position: fixed;
    top: 0; left: 0; z-index: -1;
    opacity: 0.25;
}

body::before {
    content: " "; display: block; position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(to bottom, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px; z-index: 2; pointer-events: none;
}

/* Fade In Animation */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.board-container {
    width: 85%; max-width: 800px; min-height: 200px;
    border: 2px solid var(--terminal-green);
    padding: 30px;
    display: flex; justify-content: center; align-items: center;
    text-align: center;
    box-shadow: 0 0 20px var(--glow-color), inset 0 0 20px var(--glow-color);
    margin-bottom: 50px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    z-index: 10; position: relative;
    transition: box-shadow 0.3s ease, opacity 0.8s ease-out, transform 0.8s ease-out;
}

.board-container:hover {
    box-shadow: 0 0 30px var(--glow-color), inset 0 0 30px var(--glow-color);
}

.quote-text {
    font-size: 2.5rem; line-height: 1.2;
    text-shadow: 2px 2px 0px #000; min-height: 1.2em;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.quote-text:active {
    opacity: 0.7;
}

/* --- Controls Group --- */
.controls {
    display: flex;
    gap: 15px;
    z-index: 10;
}

.magic-button {
    background-color: #000; color: var(--terminal-green);
    border: 2px solid var(--terminal-green);
    padding: 20px 40px;
    font-family: 'VT323', monospace; font-size: 1.8rem;
    cursor: pointer; transition: all 0.1s ease;
    text-transform: uppercase;
    box-shadow: 0 0 10px var(--glow-color);
}

/* Share Button Specifics */
.icon-button {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.magic-button:hover {
    background-color: var(--terminal-green); color: #000;
    box-shadow: 0 0 40px var(--glow-color);
}

.magic-button:active { transform: scale(0.96); }

.shake-screen { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
    40%, 60% { transform: translate3d(8px, 0, 0); }
}

.footer-hint {
    margin-top: 25px; font-size: 1rem; opacity: 0.8; z-index: 10;
    background-color: #000; padding: 5px 10px; border: 1px solid #333;
}

@media (max-width: 600px) {
    .quote-text { font-size: 1.8rem; }
    .board-container { width: 90%; padding: 20px; }
    .magic-button { font-size: 1.5rem; padding: 15px 25px; }
}
