:root {
    --bg-color: #020205;
    --text-color: #a0a0b0;
    --text-bright: #e0e0f0;
    --accent-red: #ff003c;
    --accent-purple: #bc13fe;
    --accent-blue: #00f3ff;
    --accent-green: #0aff0a;
    --card-bg: rgba(10, 10, 20, 0.85);
    --card-border: rgba(0, 243, 255, 0.3);
    --border-glow: 0 0 10px rgba(0, 243, 255, 0.15);
    --scan-line-color: rgba(255, 255, 255, 0.04);
    --crt-flicker: 0.03;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    background-image: 
        radial-gradient(circle at 50% 50%, #111122 0%, #000000 90%);
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-size: 14px;
    text-shadow: 0 0 2px rgba(0, 243, 255, 0.2);
}

/* Background Noise & CRT Effects */
.background-noise {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.07"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    animation: flicker 0.15s infinite;
}

.scan-line::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    animation: scan 6s linear infinite;
    opacity: 0.3;
}

@keyframes scan {
    0% { top: -5%; opacity: 0; }
    5% { opacity: 0.5; }
    95% { opacity: 0.5; }
    100% { top: 105%; opacity: 0; }
}

@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}

/* Container */
.container {
    width: 95%;
    max-width: 900px;
    height: 98vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    gap: 12px;
    padding: 10px 0;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(5, 5, 10, 0.9);
    border: 1px solid var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1), inset 0 0 20px rgba(0, 243, 255, 0.05);
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.header::before {
    content: "SYSTEM_ONLINE";
    position: absolute;
    top: -8px;
    left: 20px;
    background: #000;
    padding: 0 5px;
    font-size: 0.6rem;
    color: var(--accent-blue);
    letter-spacing: 1px;
}

.header-left, .header-btns {
    display: flex;
    align-items: center;
    gap: 15px;
}

.day-counter {
    font-size: 1.4rem;
    color: var(--accent-blue);
    text-shadow: 0 0 8px var(--accent-blue);
    font-weight: bold;
    letter-spacing: 2px;
}

.player-name {
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--text-bright);
    text-transform: uppercase;
}

.terminal-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    padding: 6px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.terminal-btn:hover {
    background: var(--accent-purple);
    color: #000;
    box-shadow: 0 0 15px var(--accent-purple);
}

.terminal-btn.lang-toggle {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.terminal-btn.lang-toggle:hover {
    background: var(--accent-blue);
    color: #000;
    box-shadow: 0 0 15px var(--accent-blue);
}

/* Main Grid */
.main-grid {
    display: flex;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.death-feedback-text {
    margin: 20px 0;
    font-size: 1.1rem;
    color: var(--accent-red);
    text-shadow: 0 0 5px rgba(255, 0, 60, 0.5);
    font-style: italic;
    line-height: 1.6;
}

/* Attributes Panel - Vertical on Desktop */
.attributes-panel {
    width: 260px; /* Slightly wider */
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(5, 5, 10, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    flex-shrink: 0;
    position: relative;
    overflow-y: auto; /* Allow scrolling on smaller screens */
    overflow-x: hidden;
    min-height: 0;
}

/* Scrollbar for sidebar */
.attributes-panel::-webkit-scrollbar { width: 4px; }
.attributes-panel::-webkit-scrollbar-track { background: transparent; }
.attributes-panel::-webkit-scrollbar-thumb { background: rgba(0, 243, 255, 0.2); }

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.avatar-frame {
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    background: rgba(0, 243, 255, 0.05);
    position: relative;
}

.avatar-frame::after {
    content: "";
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px dashed var(--accent-blue);
    animation: spin 10s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.avatar-placeholder {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: bold;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.8rem;
    color: #888;
}

#status-indicator {
    color: var(--accent-green);
    font-weight: bold;
    text-shadow: 0 0 5px var(--accent-green);
}

.id-code {
    font-size: 0.7rem;
    color: #555;
    letter-spacing: 1px;
}

.attr-group {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: all 0.3s;
}

.attr-group:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-blue);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.05);
}

.attr-group label {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: #aaa;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.attr-icon {
    font-size: 0.9rem;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.attr-group:hover .attr-icon {
    filter: grayscale(0%);
    text-shadow: 0 0 5px currentColor;
}

.progress-bar {
    height: 10px; /* Thicker */
    background: #000;
    border: 1px solid #333;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    margin-top: 2px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0.5;
}

.data-stream {
    font-size: 0.6rem;
    color: var(--accent-blue);
    display: flex;
    justify-content: space-between;
    font-family: monospace;
}

.hex-grid {
    height: 20px;
    background-image: radial-gradient(var(--accent-blue) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.3;
}

/* Grid lines on progress bar */
.progress-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 95%, #000 95%);
    background-size: 10% 100%;
    pointer-events: none;
}

.fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fill::after {
    content: "";
    position: absolute;
    top: 0; right: 0; width: 2px; height: 100%;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 5px white;
}

.fill.san { background: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue); }
.fill.energy { background: #ffcc00; box-shadow: 0 0 10px #ffcc00; }
.fill.clean { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.fill.int { background: var(--accent-purple); box-shadow: 0 0 10px var(--accent-purple); }

.val {
    font-size: 0.9rem;
    color: #fff;
    position: absolute;
    right: 0;
    top: -18px;
    font-weight: bold;
}

/* Center Panel */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

/* Event Card */
.event-card {
    background: rgba(10, 12, 20, 0.9);
    border: 1px solid var(--accent-blue);
    box-shadow: inset 0 0 30px rgba(0, 243, 255, 0.05);
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Decorative corners */
.event-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 1px solid transparent;
    background: 
        linear-gradient(to right, var(--accent-blue) 2px, transparent 2px) 0 0,
        linear-gradient(to bottom, var(--accent-blue) 2px, transparent 2px) 0 0,
        linear-gradient(to left, var(--accent-blue) 2px, transparent 2px) 100% 0,
        linear-gradient(to bottom, var(--accent-blue) 2px, transparent 2px) 100% 0,
        linear-gradient(to right, var(--accent-blue) 2px, transparent 2px) 0 100%,
        linear-gradient(to top, var(--accent-blue) 2px, transparent 2px) 0 100%,
        linear-gradient(to left, var(--accent-blue) 2px, transparent 2px) 100% 100%,
        linear-gradient(to top, var(--accent-blue) 2px, transparent 2px) 100% 100%;
    background-repeat: no-repeat;
    background-size: 15px 15px;
    pointer-events: none;
    opacity: 0.7;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    z-index: 2;
}

#event-title {
    color: var(--accent-red);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--accent-red);
    border-bottom: 1px solid rgba(255, 0, 60, 0.3);
    padding-bottom: 10px;
    width: 100%;
}

#event-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-bright);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
}

/* Options */
.options-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding-bottom: 10px;
}

.option-btn {
    background: rgba(255, 0, 60, 0.05);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 12px 25px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    min-width: 140px;
    max-width: 240px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.option-btn::before {
    content: "> ";
    opacity: 0;
    transition: opacity 0.2s;
}

.option-btn:hover {
    background: var(--accent-red);
    color: #000;
    box-shadow: 0 0 20px var(--accent-red);
    transform: translateY(-2px);
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:disabled {
    border-color: #555;
    color: #555;
    background: transparent;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Actions Box */
.actions-box {
    background: rgba(10, 10, 20, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 2px;
}

.actions-box h3 {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#actions-left {
    color: var(--accent-blue);
    font-size: 1rem;
    text-shadow: 0 0 5px var(--accent-blue);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.action-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 12px 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

/* Log Console */
.log-console {
    height: 155px;
    background: #000;
    border: 1px solid #333;
    padding: 10px 15px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #888;
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
    box-shadow: inset 0 0 10px #000;
}

.log-entry {
    margin-bottom: 4px;
    line-height: 1.4;
}

.log-entry::before {
    content: ">> ";
    color: #444;
}

.log-entry.punishment { color: var(--accent-red); text-shadow: 0 0 3px var(--accent-red); }
.log-entry.reward { color: var(--accent-green); }
.log-entry.day-header {
    color: var(--accent-blue);
    font-weight: bold;
    margin: 10px 0 5px 0;
    border-top: 1px dashed #333;
    padding-top: 5px;
}
.log-entry.day-header::before { content: ""; }

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden { display: none !important; }

.modal-content {
    background: #050510;
    border: 1px solid var(--accent-blue);
    padding: 30px;
    width: 650px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Modal Headers */
.terminal-style h2, .danger-style h2 {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--accent-blue);
}

.danger-style h2 {
    color: var(--accent-red);
    border-color: var(--accent-red);
    text-shadow: 0 0 10px var(--accent-red);
}

/* Rules List */
.rules-list-modal {
    list-style: none;
    margin-bottom: 25px;
}

.rules-list-modal li {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.5;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    color: #ccc;
}

.rule-id {
    color: var(--accent-red);
    font-weight: bold;
    margin-right: 15px;
    background: rgba(255, 0, 60, 0.1);
    padding: 2px 6px;
    border-radius: 2px;
}

.rule-hint {
    color: #666;
    font-style: italic;
    margin-bottom: 25px;
    text-align: center;
    border-top: 1px dashed #333;
    padding-top: 15px;
}

/* Leaderboard */
.lb-row {
    display: flex;
    padding: 12px 10px;
    border-bottom: 1px solid #222;
    font-size: 0.95rem;
    transition: background 0.2s;
    align-items: center; /* Align items vertically */
}

#lb-header .lb-row {
    border-bottom: none; /* Removed border from header row itself as it's handled in JS or parent */
    font-weight: bold;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5); /* Slight background for header */
}

.lb-list {
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--accent-blue); /* Add border top to list to separate from header */
}

.lb-row:hover { background: rgba(255, 255, 255, 0.03); }

.lb-row span { flex: 1; text-align: center; }
.lb-row span:nth-child(2) { flex: 2; text-align: left; padding-left: 10px; }

/* Rank 1-3 Colors */
.lb-list .lb-row:nth-child(1) { color: #ffd700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); font-weight: bold; } /* Rank 1 */
.lb-list .lb-row:nth-child(2) { color: #e6c200; text-shadow: 0 0 5px rgba(230, 194, 0, 0.3); } /* Rank 2 */
.lb-list .lb-row:nth-child(3) { color: #ccad00; } /* Rank 3 */

.lb-row.self {
    color: var(--accent-red);
    background: rgba(255, 0, 60, 0.05);
    border: 1px solid rgba(255, 0, 60, 0.3);
}

/* Buttons in Modal */
.full-width {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    margin-top: auto;
    background: var(--accent-blue);
    color: #000;
    border: none;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.full-width:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--accent-blue);
}

.restart-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.restart-btn:hover {
    background: var(--accent-red);
    color: #000;
    box-shadow: 0 0 30px var(--accent-red);
}

.close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover { color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Mobile Responsive */
@media (max-width: 1024px) {
    .container {
        height: 100vh;
        width: 100%;
        padding: 0;
        gap: 0;
    }
    
    .header {
        padding: 10px;
        border: none;
        border-bottom: 1px solid var(--accent-blue);
    }
    
    .main-grid {
        flex-direction: column;
        gap: 0;
        overflow-y: auto;
    }
    
    .attributes-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        padding: 8px 10px;
        background: rgba(0,0,0,0.5);
        border: none;
        border-bottom: 1px solid #333;
        flex-shrink: 0;
        min-height: auto;
        overflow: visible;
    }
    
    .sidebar-header, .sidebar-footer {
        display: none;
    }
    
    .attr-group {
        flex: 1;
        min-width: 45%;
        border-left: none;
        padding-left: 0;
        background: transparent;
        border: none;
        padding: 0;
    }
    
    .attr-group:hover {
        background: transparent;
        box-shadow: none;
    }

    .attr-group label {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }

    .progress-bar {
        height: 6px;
        margin-top: 1px;
    }
    
    .val {
        position: static;
        font-size: 0.8rem;
        text-align: right;
    }
    
    .center-panel {
        gap: 0;
    }
    
    .event-card {
        border: none;
        padding: 15px;
        background: transparent;
    }
    
    .actions-box {
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--accent-blue);
        background: #050510;
        padding: 10px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .log-console {
        height: 110px;
        border: none;
        border-top: 1px solid #333;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border: none;
        padding: 10px;
    }

    .lb-list {
        max-height: none;
        flex: 1;
        min-height: 0;
    }

    .lb-row {
        font-size: 0.8rem;
        padding: 8px 2px;
    }
}

@media (max-width: 767px) {
    .log-console {
        height: 220px;
    }
}

/* Log Prefixes */
.log-prefix {
    color: #afeeee; /* PaleTurquoise - bright but not neon */
    font-weight: bold;
    text-shadow: 0 0 2px rgba(175, 238, 238, 0.5);
    margin-right: 5px;
}

/* Danger State Animation */
.fill.danger {
    background: var(--accent-red) !important;
    box-shadow: 0 0 15px var(--accent-red) !important;
    animation: pulse-danger 0.5s infinite alternate;
}

@keyframes pulse-danger {
    from { opacity: 1; box-shadow: 0 0 15px var(--accent-red); }
    to { opacity: 0.7; box-shadow: 0 0 5px var(--accent-red); }
}

/* Glitch Effect Class */
.eerie-glitch {
    animation: eerie-shake 0.3s infinite;
    position: relative;
    background: rgba(40, 0, 0, 0.95) !important;
    border: 2px solid var(--accent-red) !important;
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.6) !important;
}

.eerie-glitch h2 {
    color: #ff003c !important;
    text-shadow: 2px 2px #000, -2px -2px #00fff9, 0 0 10px #ff003c;
    animation: text-flicker 0.1s infinite;
}

@keyframes eerie-shake {
    0% { transform: translate(0,0) skew(0deg); }
    20% { transform: translate(-2px, 2px) skew(1deg); }
    40% { transform: translate(-2px, -2px) skew(-1deg); }
    60% { transform: translate(2px, 2px) skew(1deg); }
    80% { transform: translate(2px, -2px) skew(-1deg); }
    100% { transform: translate(0,0) skew(0deg); }
}

@keyframes text-flicker {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
    5% { clip: rect(70px, 9999px, 11px, 0); transform: skew(0.24deg); }
    10% { clip: rect(6px, 9999px, 83px, 0); transform: skew(0.06deg); }
    15% { clip: rect(22px, 9999px, 5px, 0); transform: skew(0.23deg); }
    20% { clip: rect(74px, 9999px, 88px, 0); transform: skew(0.44deg); }
    25% { clip: rect(79px, 9999px, 35px, 0); transform: skew(0.66deg); }
    30% { clip: rect(21px, 9999px, 16px, 0); transform: skew(0.33deg); }
    35% { clip: rect(96px, 9999px, 63px, 0); transform: skew(0.04deg); }
    40% { clip: rect(59px, 9999px, 2px, 0); transform: skew(0.65deg); }
    45% { clip: rect(3px, 9999px, 99px, 0); transform: skew(0.12deg); }
    50% { clip: rect(42px, 9999px, 54px, 0); transform: skew(0.51deg); }
    55% { clip: rect(87px, 9999px, 20px, 0); transform: skew(0.51deg); }
    60% { clip: rect(30px, 9999px, 14px, 0); transform: skew(0.72deg); }
    65% { clip: rect(64px, 9999px, 92px, 0); transform: skew(0.22deg); }
    70% { clip: rect(5px, 9999px, 66px, 0); transform: skew(0.96deg); }
    75% { clip: rect(98px, 9999px, 3px, 0); transform: skew(0.81deg); }
    80% { clip: rect(26px, 9999px, 17px, 0); transform: skew(0.59deg); }
    85% { clip: rect(81px, 9999px, 47px, 0); transform: skew(0.78deg); }
    90% { clip: rect(10px, 9999px, 65px, 0); transform: skew(0.66deg); }
    95% { clip: rect(50px, 9999px, 31px, 0); transform: skew(0.23deg); }
    100% { clip: rect(9px, 9999px, 7px, 0); transform: skew(0.69deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); transform: skew(0.53deg); }
    5% { clip: rect(51px, 9999px, 18px, 0); transform: skew(0.31deg); }
    10% { clip: rect(4px, 9999px, 86px, 0); transform: skew(0.39deg); }
    15% { clip: rect(84px, 9999px, 75px, 0); transform: skew(0.85deg); }
    20% { clip: rect(35px, 9999px, 49px, 0); transform: skew(0.18deg); }
    25% { clip: rect(18px, 9999px, 11px, 0); transform: skew(0.97deg); }
    30% { clip: rect(66px, 9999px, 58px, 0); transform: skew(0.61deg); }
    35% { clip: rect(27px, 9999px, 22px, 0); transform: skew(0.25deg); }
    40% { clip: rect(72px, 9999px, 95px, 0); transform: skew(0.04deg); }
    45% { clip: rect(56px, 9999px, 8px, 0); transform: skew(0.99deg); }
    50% { clip: rect(11px, 9999px, 67px, 0); transform: skew(0.48deg); }
    55% { clip: rect(91px, 9999px, 41px, 0); transform: skew(0.07deg); }
    60% { clip: rect(48px, 9999px, 38px, 0); transform: skew(0.32deg); }
    65% { clip: rect(5px, 9999px, 53px, 0); transform: skew(0.95deg); }
    70% { clip: rect(80px, 9999px, 29px, 0); transform: skew(0.17deg); }
    75% { clip: rect(13px, 9999px, 89px, 0); transform: skew(0.52deg); }
    80% { clip: rect(43px, 9999px, 6px, 0); transform: skew(0.79deg); }
    85% { clip: rect(93px, 9999px, 60px, 0); transform: skew(0.21deg); }
    90% { clip: rect(16px, 9999px, 85px, 0); transform: skew(0.88deg); }
    95% { clip: rect(2px, 9999px, 34px, 0); transform: skew(0.09deg); }
    100% { clip: rect(32px, 9999px, 96px, 0); transform: skew(0.43deg); }
}

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