:root {
    --primary: #0f0;
    --primary-dim: #003300;
    --secondary: #d600ff;
    /* Hot pink/purple for cats */
    --bg: #000;
    --text: #e0e0e0;
    --glass: rgba(0, 20, 0, 0.7);
    --glass-border: 1px solid rgba(0, 255, 0, 0.3);
    --font-mono: 'Fira Code', monospace;
    --font-display: 'Press Start 2P', cursive;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    overflow-x: hidden;
    min-height: 100vh;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 90%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Typography & Glitch */
h1,
h2,
h3 {
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-shadow: 0 0 10px var(--primary);
    line-height: 1.4;
    text-align: center;
}

.glitch {
    position: relative;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 100px, 0);
    }

    60% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(120px, 9999px, 140px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 80px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(120px, 9999px, 140px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(60px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 100px, 0);
    }

    80% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(40px, 9999px, 60px, 0);
    }
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-decoration: none;
    text-transform: uppercase;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    margin: 0.5rem;
}

.btn.primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.btn.primary:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 0 25px var(--primary);
}

.btn.secondary {
    background: transparent;
    color: var(--primary);
}

.btn.secondary:hover {
    background: var(--primary-dim);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
}

.cta-group {
    text-align: center;
    margin-bottom: 2rem;
}

/* Glass Panel */
.glass-panel {
    background: var(--glass);
    border: var(--glass-border);
    backdrop-filter: blur(5px);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.tag {
    color: var(--secondary);
}

/* CA Box */
.ca-box {
    text-align: center;
    font-family: var(--font-mono);
    border: 1px dashed var(--primary);
    padding: 1rem;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.5);
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Generator */
.generator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.cat-preview {
    width: 100%;
    min-height: 350px;
    border: 2px solid var(--secondary);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.code-display {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 4px;
    position: relative;
}

.code-display pre {
    white-space: pre-wrap;
    color: #aaa;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
}

.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Stats */
.stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stats li {
    border: 1px solid var(--primary);
    padding: 1rem;
    color: #fff;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .cat-preview {
        width: 100%;
        height: 250px;
    }
}