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

body {
    /* Puts the element behind all other content, so it's only visible as a background */
    background: rgb(92, 16, 68);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    position: relative;
}

.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;


    /* ???? */
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    /* z-index: 1 elements lie over below z indices, z index -1, below*/
}

.main-title {
    color: #ffffff;
    /* clamp(MIN, PREFERRED, MAX) */
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;


    /*??? */
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #34a9db;
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: 0.02em;
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    width: 100%;
    margin-bottom: 3rem;
}

.effect-card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.effect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.effect-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

.effect-card:hover::before {
    opacity: 1;
}

.effect-title {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.025em;
}

/* Base scramble text styling */
.scramble-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Matrix Style Scramble */
.matrix-scramble {
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 0 10px #00ff41;
    letter-spacing: 2px;
}

/* Cyber Style Scramble */
.cyber-scramble {
    color: #00d9ff;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 0 15px #00d9ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Neon Style Scramble */
.neon-scramble {
    color: #ff006e;
    font-family: 'Space Grotesk', sans-serif;
    text-shadow:
        0 0 5px #ff006e,
        0 0 10px #ff006e,
        0 0 15px #ff006e;
    letter-spacing: 3px;
}

/* Glitch Style Scramble */
.glitch-scramble {
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

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

.glitch-scramble::before {
    color: #ff0080;
    animation: glitch-1 0.3s infinite;
    z-index: -1;
}

.glitch-scramble::after {
    color: #00ffff;
    animation: glitch-2 0.3s infinite;
    z-index: -2;
}

@keyframes glitch-1 {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(2px, -2px);
    }

    40% {
        transform: translate(-2px, 2px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(2px, 2px);
    }
}

/* Terminal Style Scramble */
.terminal-scramble {
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #00ff00;
    position: relative;
}

.terminal-scramble::before {
    content: '> ';
    color: #00ff00;
}

.terminal-scramble::after {
    content: '_';
    animation: terminal-cursor 1s infinite;
    margin-left: 4px;
}

@keyframes terminal-cursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Holographic Style Scramble */
.holographic-scramble {
    color: transparent;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: holographic-shift 3s ease-in-out infinite;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 2px;
}

@keyframes holographic-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Control Panel */
.control-panel {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.control-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.control-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:active {
    transform: translateY(0);
}

/* Special Effects */
.typing-effect {
    border-right: 2px solid;
    animation: typing-cursor 1s infinite;
}

@keyframes typing-cursor {

    0%,
    50% {
        border-color: transparent;
    }

    51%,
    100% {
        border-color: currentColor;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .effects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .effect-card {
        padding: 2rem;
        min-height: 250px;
    }

    .scramble-text {
        font-size: clamp(1.2rem, 4vw, 2rem);
        min-height: 60px;
    }
}