:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    
    /* Strength Colors */
    --strength-0: #334155;
    --strength-1: #ef4444; /* Weak */
    --strength-2: #f97316; /* Fair */
    --strength-3: #eab308; /* Good */
    --strength-4: #22c55e; /* Strong */
    --strength-5: #06b6d4; /* Very Strong */
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(to right, #c084fc, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(192, 132, 252, 0.3);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    padding-left: 50px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    transition: var(--transition);
    outline: none;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.toggle-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

.strength-meter-container {
    margin-bottom: 24px;
}

.strength-meter {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: var(--strength-0);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease, box-shadow 0.4s ease;
}

.strength-text {
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-align: right;
    color: var(--text-secondary);
}

.requirements {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.requirements h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

ul {
    list-style: none;
}

.req-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.req-item:last-child {
    margin-bottom: 0;
}

.req-item .icon-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    margin-left: 12px;
    transition: var(--transition);
}

.icon-cross {
    color: var(--strength-1);
    transition: var(--transition);
}

.icon-check {
    color: var(--strength-4);
    transition: var(--transition);
}

/* Valid Requirement State */
.req-item.valid {
    color: var(--text-primary);
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.feedback {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

#time-to-crack {
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 480px) {
    .glass-panel {
        padding: 24px;
    }
    
    h1 {
        font-size: 2rem;
    }
}
