* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "JetBrains Mono", "Segoe UI", monospace;
    background: #020617;
    color: #bbf7d0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    animation: slideUp 0.8s ease;
    position: relative;
}

.logo {
    display: block;
    margin: 0 auto 10px;
    width: 85px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    filter: drop-shadow(0 0 10px #22c55e);
}

h1 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 4px;
    color: #22c55e;
}

.subtitle {
    text-align: center;
    color: #86efac;
    margin-bottom: 18px;
}

.card {
    background: rgba(2, 6, 23, 0.85);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2),
                0 20px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

/* Ensure inputs/buttons are above matrix */
.card > *:not(.matrix) {
    position: relative;
    z-index: 2;
}

/* Matrix animation */
.matrix {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.matrix::before {
    content: "010101 CONGRATS ICSE 010101 CONGRATS ICSE 010101 010101 CONGRATS ICSE 010101 CONGRATS ICSE 010101";
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 200%;
    color: rgba(34, 197, 94, 0.35);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 4px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    animation: matrixRain 8s linear infinite;
}

/* Headings */
h2 {
    font-size: 15px;
    margin-top: 18px;
    margin-bottom: 8px;
    color: #4ade80;
}

/* Inputs */
input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: #020617;
    color: #bbf7d0;
    font-size: 15px;
    transition: all 0.2s ease;
}

input::placeholder {
    color: #4ade80;
    opacity: 0.6;
}

input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25),
                0 0 18px rgba(34, 197, 94, 0.6);
    transform: scale(1.01);
}

/* Button */
button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.6);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Result box */
.result {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    animation: popIn 0.35s ease;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes matrixRain {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(50%);
    }
}
