/* GhostPass - Glassmorphism UI with Matrix aesthetic */
:root {
    --neon-green: #00ff41;
    --neon-cyan: #00ffff;
    --dark-bg: #0a0a0a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --shadow-glow: 0 0 20px rgba(0, 255, 65, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Matrix Rain Canvas */
.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--neon-green), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--shadow-glow);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px var(--neon-green)); }
    to { filter: drop-shadow(0 0 20px var(--neon-cyan)); }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Matrix Toggle */
.matrix-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--neon-green);
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.matrix-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: var(--shadow-glow);
    transform: scale(1.1);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 255, 65, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 65, 0.1);
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-label, .output-label {
    display: block;
    margin-bottom: 10px;
    color: var(--neon-green);
    font-weight: bold;
    font-size: 1.1rem;
}

.input-container, .output-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field, .output-field {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 50px 15px 15px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.input-field:focus, .output-field:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.input-field::placeholder, .output-field::placeholder {
    color: var(--text-secondary);
}

/* Toggle Visibility Button */
.toggle-visibility, .copy-btn {
    position: absolute;
    right: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 65, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-visibility:hover, .copy-btn:hover {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--neon-green);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.toggle-visibility:active, .copy-btn:active {
    transform: scale(0.95);
    background: rgba(0, 255, 65, 0.25);
}

/* Input Meta */
.input-meta, .output-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.char-counter, .length-counter {
    color: var(--neon-cyan);
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 15px;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--neon-green);
}

.toggle-container input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(30px);
    background: var(--neon-green);
}

.toggle-label {
    color: var(--text-primary);
    font-weight: bold;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
}

.generate-btn, .clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.generate-btn {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.generate-btn:hover {
    background: var(--neon-green);
    color: var(--dark-bg);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.clear-btn {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4444;
    color: #ff4444;
}

.clear-btn:hover {
    background: #ff4444;
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* Output Section */
.output-section {
    margin-top: 30px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Card */
.info-card h3 {
    color: var(--neon-cyan);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card li:last-child {
    border-bottom: none;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--neon-green);
    border-radius: 12px;
    padding: 15px 20px;
    color: var(--neon-green);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-glow);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .matrix-toggle {
        position: relative;
        margin: 20px auto 0;
    }
    
    .header {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .matrix-canvas {
        display: none;
    }
}

/* Focus indicators */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}