/* Matrix Digital Rain - Professional Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #008f11;
    --matrix-light-green: #00ff99;
    --accent-blue: #0da5ff;
    --accent-blue-dark: #0a3f66;
    --accent-blue-glow: rgba(13, 165, 255, 0.4);
    --bg-black: #000000;
    --bg-dark: #0d0d0d;
    --text-dim: #003b00;
    --glow-color: rgba(0, 255, 65, 0.5);
}

body {
    font-family: 'Courier New', Courier, monospace;
    background: var(--bg-black);
    color: var(--matrix-green);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.music-toggle {
    position: fixed;
    top: 14px;
    left: 20px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    padding: 6px 10px;
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.music-btn {
    background: none;
    border: 1px solid var(--accent-blue);
    color: var(--matrix-dark-green);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-btn:hover {
    color: var(--matrix-green);
    border-color: var(--matrix-green);
    box-shadow: 0 0 8px var(--glow-color);
}

.music-btn.active {
    color: var(--matrix-green);
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px var(--glow-color);
}

.music-label {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--accent-blue);
    opacity: 0.8;
}

.language-switch {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    padding: 6px 10px;
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.language-switch label {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.language-switch select {
    background: rgba(0, 0, 0, 0.7);
    color: var(--matrix-green);
    border: 1px solid var(--accent-blue);
    padding: 4px 8px;
    font-family: inherit;
    border-radius: 3px;
}

.sponsoring-switch {
    position: fixed;
    bottom: 14px;
    left: 18px;
    z-index: 1100;
}

.sponsor-btn {
    padding: 10px 16px;
    font-size: 12px;
    font-family: monospace;
    font-weight: bold;
    color: var(--matrix-green);
    background: rgba(5, 20, 40, 0.85);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--accent-blue-glow);
    letter-spacing: 1px;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-btn:hover {
    background: rgba(13, 165, 255, 0.08);
    box-shadow: 0 0 16px var(--accent-blue-glow);
    transform: translateY(-1px);
}

.sponsor-btn:disabled,
.sponsor-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.legal-link {
    position: fixed;
    bottom: 14px;
    right: 18px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: monospace;
    font-weight: bold;
    color: #ff9900;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 153, 0, 0.6);
    border-radius: 4px;
    cursor: pointer;
    z-index: 1100;
    transition: all 0.2s ease;
}

.legal-link:hover {
    color: #ffdd99;
    border-color: #ffcc66;
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    color: var(--matrix-green);
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body p,
.modal-body ul,
.modal-body li {
    color: var(--matrix-green);
}

.modal-body a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.legal-content {
    color: var(--matrix-green);
    line-height: 1.6;
    font-family: 'Courier New', monospace;
}

.legal-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 20px;
    gap: 10px;
}

.legal-actions .matrix-btn {
    min-width: auto;
    padding: 8px 16px;
}

.legal-page {
    background: var(--bg-black);
    color: var(--matrix-green);
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    padding: 40px 16px;
    min-height: 100vh;
}

.legal-wrapper {
    width: min(900px, 100%);
    background: linear-gradient(135deg, rgba(5, 20, 35, 0.9), rgba(0, 0, 0, 0.85));
    border: 2px solid var(--accent-blue);
    border-radius: 6px;
    padding: 28px 32px;
    box-shadow: 0 0 20px var(--accent-blue-glow), inset 0 0 40px rgba(13, 165, 255, 0.08);
}

.legal-wrapper h1,
.legal-wrapper h2,
.legal-wrapper h3,
.legal-wrapper h4 {
    color: var(--accent-blue);
    text-shadow: 0 0 8px var(--glow-color);
    margin-top: 18px;
    margin-bottom: 10px;
}

.legal-wrapper p,
.legal-wrapper li {
    color: var(--matrix-green);
}

.legal-wrapper ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

/* Matrix Rain Canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

/* Interface Container (initially hidden) */
.interface-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: none; /* Initially hidden */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #ff4444;
    background: rgba(0, 0, 0, 0.75);
    color: #ff4444;
    cursor: pointer;
    z-index: 50;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.screen-close:hover {
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 14px rgba(255, 68, 68, 0.6);
}

/* Start Button Container */
.start-button-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.start-btn {
    padding: 28px 64px;
    font-size: 22px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--matrix-green);
    background: linear-gradient(135deg, rgba(5, 20, 35, 0.85), rgba(0, 0, 0, 0.8));
    border: 2px solid var(--accent-blue);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 6px;
    text-transform: none;
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    box-shadow: 0 0 25px var(--accent-blue-glow), inset 0 0 40px rgba(13, 165, 255, 0.08);
    animation: startBtnPulse 3s ease-in-out infinite;
}

.start-btn:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--matrix-green), 0 0 30px var(--matrix-green), 0 0 45px var(--matrix-green);
    transform: scale(1.08);
    letter-spacing: 10px;
    box-shadow: 0 0 40px var(--accent-blue-glow), 0 0 60px rgba(13, 165, 255, 0.3), inset 0 0 50px rgba(13, 165, 255, 0.12);
    border-color: var(--matrix-green);
}

@keyframes startBtnPulse {
    0%, 100% {
        opacity: 0.9;
        box-shadow: 0 0 25px var(--accent-blue-glow), inset 0 0 40px rgba(13, 165, 255, 0.08);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 35px var(--accent-blue-glow), 0 0 50px rgba(13, 165, 255, 0.2), inset 0 0 50px rgba(13, 165, 255, 0.1);
    }
}

.start-btn span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Screen System */
.screen {
    display: none;
    position: relative;
    width: 100%;
    max-width: 600px;
    background: linear-gradient(135deg, rgba(5, 20, 35, 0.9), rgba(0, 0, 0, 0.85));
    border: 2px solid var(--accent-blue);
    border-radius: 4px;
    padding: 40px;
    box-shadow:
        0 0 20px var(--accent-blue-glow),
        inset 0 0 40px rgba(13, 165, 255, 0.08);
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    text-align: center;
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 8px;
    margin-bottom: 20px;
}

.matrix-char {
    display: inline-block;
    animation: glowPulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px var(--glow-color);
}

.matrix-char:nth-child(1) { animation-delay: 0s; }
.matrix-char:nth-child(2) { animation-delay: 0.1s; }
.matrix-char:nth-child(3) { animation-delay: 0.2s; }
.matrix-char:nth-child(4) { animation-delay: 0.3s; }
.matrix-char:nth-child(5) { animation-delay: 0.4s; }
.matrix-char:nth-child(6) { animation-delay: 0.5s; }

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 10px var(--glow-color); }
    50% { text-shadow: 0 0 20px var(--glow-color), 0 0 30px var(--glow-color); }
}

/* Typography */
h1, h2 {
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--glow-color);
}

h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.subtitle, .screen-subtitle {
    text-align: center;
    color: var(--matrix-dark-green);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
    opacity: 0.8;
}

.glitch::after {
    animation: glitch-2 3s infinite;
    clip-path: polygon(0 45%, 100% 45%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
    opacity: 0.8;
}

@keyframes glitch-1 {
    0%, 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%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

/* Input Groups */
.input-group {
    margin-bottom: 25px;
}

.input-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--matrix-dark-green);
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid var(--matrix-dark-green);
    color: var(--matrix-green);
    padding: 12px 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.3s ease;
    resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    background: rgba(0, 30, 0, 0.8);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-dim);
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--matrix-dark-green);
    margin-top: 5px;
}

.field-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--matrix-dark-green);
    opacity: 0.85;
}

.challenge-box {
    margin-top: 15px;
    padding: 15px;
    border: 1px dashed var(--accent-blue);
    background: rgba(5, 25, 40, 0.6);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--accent-blue-glow);
}

.challenge-title {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--matrix-light-green);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.challenge-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--matrix-green);
    margin-bottom: 10px;
}

.input-group.slim {
    margin-bottom: 10px;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.matrix-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 2px solid var(--matrix-green);
    color: var(--matrix-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
}

.matrix-btn span {
    position: relative;
    z-index: 1;
}

.matrix-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--matrix-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: 0;
}

.matrix-btn:hover {
    color: var(--bg-black);
    box-shadow: 0 0 20px var(--glow-color);
}

.matrix-btn:hover::before {
    width: 300px;
    height: 300px;
}

.matrix-btn:active {
    transform: scale(0.98);
}

.matrix-btn.primary {
    background: var(--matrix-green);
    color: var(--bg-black);
    font-weight: bold;
}

.matrix-btn.primary:hover {
    background: var(--matrix-light-green);
    box-shadow: 0 0 30px var(--glow-color);
}

.matrix-btn.secondary {
    border-color: #ff4444;
    color: #ff4444;
}

.matrix-btn.secondary::before {
    background: #ff4444;
}

.matrix-btn.secondary:hover {
    border-color: #ff6666;
    color: var(--bg-black);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
}

.matrix-btn.tertiary {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.matrix-btn.tertiary::before {
    background: var(--accent-blue);
}

.matrix-btn.tertiary:hover {
    border-color: var(--accent-blue);
    color: var(--bg-black);
    box-shadow: 0 0 15px var(--accent-blue-glow);
}

.matrix-btn.warning {
    border-color: #ffcc00;
    color: #ffcc00;
}

.matrix-btn.warning::before {
    background: #ffcc00;
}

.matrix-btn.warning:hover {
    border-color: #ffdd44;
    color: var(--bg-black);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}

.matrix-btn.small {
    padding: 10px 20px;
    font-size: 12px;
    min-width: auto;
    margin: 15px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
}

/* Result Containers */
.result-container {
    margin-top: 30px;
    padding: 25px;
    background: rgba(5, 30, 50, 0.45);
    border: 1px solid var(--accent-blue);
    border-radius: 3px;
    animation: slideIn 0.5s ease-in-out;
}

.activity-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: rgba(5, 25, 40, 0.9);
    border: 1px solid var(--accent-blue);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 18px var(--accent-blue-glow);
    z-index: 1050;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.activity-header h3 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.activity-close {
    background: none;
    border: 1px solid var(--accent-blue);
    color: var(--matrix-green);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.activity-summary {
    font-size: 12px;
    color: var(--matrix-green);
    margin: 0 0 10px 0;
}

.activity-list {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(13, 165, 255, 0.3);
    border-radius: 4px;
    padding: 10px;
    max-height: 240px;
    overflow-y: auto;
    font-size: 12px;
    color: var(--matrix-green);
}

.activity-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-item:last-child {
    border-bottom: none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
}

.modal-card {
    max-width: 640px;
    width: 100%;
    background: rgba(5, 20, 35, 0.92);
    border: 1px solid var(--accent-blue);
    border-radius: 6px;
    padding: 24px 28px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.45), 0 0 18px var(--accent-blue-glow);
}

.modal-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--accent-blue);
}

.modal-card p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: var(--matrix-green);
}

.sponsor-thanks {
    position: fixed;
    bottom: 14px;
    left: 140px;
    color: #ff9900;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
    z-index: 1100;
}

/* Decrypt Result - Positioned at Bottom Center (schlicht) */
#decrypt-result {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    max-width: 500px;
    width: auto;
    min-width: 320px;
    padding: 12px 18px;
    background: rgba(5, 20, 35, 0.8);
    border: 1px solid rgba(13, 165, 255, 0.55);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideInFromBottom 0.4s ease-out;
}

#decrypt-result .result-success {
    text-align: center;
}

#decrypt-result .success-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 14px;
    margin: 0 8px 0 0;
    background: none;
    color: var(--matrix-green);
    border-radius: 0;
    animation: none;
}

#decrypt-result h3 {
    display: inline-block;
    font-size: 13px;
    margin: 0;
    color: var(--matrix-green);
    font-weight: normal;
    opacity: 0.8;
}

#decrypt-result .message-display {
    font-size: 14px;
    margin-top: 8px;
    max-height: 150px;
    overflow-y: auto;
    color: #00ff00;
}

#decrypt-result .extraction-status {
    font-size: 11px;
    padding: 4px 0;
    opacity: 0.7;
}

#decrypt-result #extraction-complete {
    display: inline;
}

#decrypt-result .reset-btn {
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 11px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: var(--matrix-green);
    border-radius: 3px;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s ease;
}

#decrypt-result .reset-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--matrix-green);
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-success {
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--matrix-green);
    color: var(--bg-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.key-display {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--matrix-green);
    padding: 20px;
    font-size: 24px;
    letter-spacing: 3px;
    margin: 20px 0;
    border-radius: 3px;
    word-break: break-all;
    text-shadow: 0 0 10px var(--glow-color);
    animation: keyGlow 2s ease-in-out infinite;
}

@keyframes keyGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    }
}

.key-display.small-display {
    font-size: 14px;
    padding: 12px;
    letter-spacing: 0;
}

.key-display a {
    color: var(--matrix-green);
    word-break: break-all;
}

.message-display {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--matrix-green);
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    border-radius: 3px;
    min-height: 60px;
}

.typing-effect {
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Extraction Status */
.extraction-status {
    text-align: center;
    color: var(--matrix-green);
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--matrix-green);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--glow-color);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* Error Display */
.error-display {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.error-content {
    background: rgba(139, 0, 0, 0.9);
    border: 2px solid #ff4444;
    color: #ff4444;
    padding: 15px 25px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.error-icon {
    font-size: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--text-dim);
    border-top: 4px solid var(--matrix-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 14px;
    letter-spacing: 3px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 600px) {
    .screen {
        padding: 25px;
    }

    #decrypt-result {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        min-width: auto;
    }

    .logo {
        font-size: 32px;
        letter-spacing: 4px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .matrix-btn {
        width: 100%;
        min-width: auto;
    }

    .key-display {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .activity-panel {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .input-row {
        flex-direction: column;
    }
}
