/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    overflow: auto;
}

/* Centering Logic */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 450px;
    color: #fff;
}

.custom-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 15px !important;
    border-radius: 12px !important;
}

.btn-primary-custom {
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

.result-container {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
}

/* Success State */
.success-bg {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: #28a745 !important;
    animation: bounce 0.5s ease;
}

/* Error State */
.error-bg {
    background: rgba(220, 53, 69, 0.15) !important;
    border-color: #dc3545 !important;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.visualizer-container {
    padding: 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.character-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.char-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: white;
    color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.4s ease;
}

.active {
    transform: scale(1.15);
    background: #ffd166;
}

.match {
    background: #06d6a0;
    color: white;
}

.mismatch {
    background: #ef476f;
    color: white;
}

.processed-text {
    color: white;
    font-weight: 500;
    font-size: 16px;
}

.stats p {
    margin: 4px 0;
}

@media (max-width: 600px) {
    .char-box {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}