/* ================= VARIABLES ================= */
:root {
    --primary: #00e676; 
    --primary-glow: rgba(0, 230, 118, 0.4);
    --bg-dark: #050505;
    --surface: rgba(30, 30, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --danger: #ff5252;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
}

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

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 230, 118, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(41, 98, 255, 0.08) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ================= UTILITIES ================= */
.hidden { display: none !important; }
.block-display { display: block !important; }
.text-center { text-align: center; }

/* ================= CARD STYLE ================= */
.recovery-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    position: relative;
}

/* ================= HEADER & LOGO ================= */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 800;
}
.logo-img { height: 40px; width: auto; }
.logo span {
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.header-text { text-align: center; margin-bottom: 30px; }
.header-text h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 5px; }
.header-text p { color: var(--text-muted); font-size: 0.9rem; }

/* ================= FORM ELEMENTS ================= */
.form-group { margin-bottom: 20px; position: relative; }

label {
    display: block; margin-bottom: 8px; color: var(--text-muted);
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

.input-with-icon { position: relative; }

.input-with-icon i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); z-index: 2;
}

.toggle-password {
    left: auto !important; right: 15px; cursor: pointer;
}
.toggle-password:hover { color: var(--text-main) !important; }

.form-control {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 14px 14px 14px 45px; 
    border-radius: 8px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1); background: rgba(0,0,0,0.5);
}
.form-control:focus + i, .input-with-icon:focus-within i { color: var(--primary); }

/* ================= BUTTONS ================= */
.action-button {
    width: 100%; background: var(--primary); color: #000; border: none; padding: 14px;
    border-radius: 50px; font-weight: 700; font-family: "Outfit", sans-serif;
    font-size: 1rem; cursor: pointer; transition: var(--transition); margin-top: 10px;
}
.action-button:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--primary-glow); }

.btn-secondary {
    background: #333; border: 1px solid #555; color: #fff;
}
.btn-secondary:hover { background: #444; box-shadow: none; }

.btn-link {
    display: block; text-decoration: none; margin-top: 15px; line-height: 20px;
    background: var(--primary); color: #000; text-align: center;
}

.back-link {
    display: block; text-align: center; margin-top: 25px; padding-top: 20px;
    border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem; text-decoration: none;
}
.back-link:hover { color: #fff; }

/* ================= SECURITY & CAPTCHA ================= */
.website-url-field { opacity: 0; position: absolute; top: 0; left: 0; height: 0; width: 0; z-index: -1; }

.captcha-container {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.2); padding: 10px; border-radius: 8px;
    border: 1px solid var(--glass-border);
}
.captcha-img {
    border-radius: 4px; height: 45px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1); transition: var(--transition);
}
.captcha-input {
    width: 100%; background: transparent; border: none; color: white;
    font-family: "JetBrains Mono", monospace; font-size: 1rem; padding: 5px;
}
.captcha-input:focus { outline: none; }
.captcha-refresh { font-size: 0.9rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.captcha-refresh:hover { color: var(--primary); transform: rotate(180deg); }

/* ================= MESSAGES ================= */
.error-message, .success-message {
    padding: 12px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 20px;
    display: none; text-align: center;
}
.error-message { background: rgba(255, 61, 0, 0.1); border: 1px solid rgba(255, 61, 0, 0.3); color: var(--danger); }
.success-message { background: rgba(0, 230, 118, 0.1); border: 1px solid rgba(0, 230, 118, 0.3); color: var(--primary); }

.warning-text {
    color: var(--danger); margin-bottom: 15px; font-size: 0.9rem; line-height: 1.4;
}

/* ================= PASSWORD VALIDATION UI ================= */
.password-requirements {
    margin-top: 8px; 
    background: rgba(255,255,255,0.03); 
    padding: 10px;
    border-radius: 6px; 
    font-size: 0.75rem;
}

.password-requirements ul { 
    list-style: none; 
    padding-left: 5px; 
}

.password-requirements li {
    margin-bottom: 4px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: #666; 
    transition: var(--transition);
}

/* Invalid State (X icon) */
li.invalid::before { 
    content: '\f00d'; 
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; 
    font-weight: 900; 
    color: #555; 
}

/* Valid State (Check icon) */
li.valid { 
    color: var(--text-muted); 
}

li.valid::before { 
    content: '\f00c'; 
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; 
    font-weight: 900; 
    color: var(--primary); 
}

/* ================= NEW KEY DISPLAY BOX ================= */
.key-display-box {
    background: rgba(0, 230, 118, 0.1); 
    border: 1px dashed var(--primary);
    color: var(--primary); 
    padding: 15px; 
    border-radius: 8px;
    font-family: "JetBrains Mono", monospace; 
    font-size: 1.1rem; 
    letter-spacing: 1px;
    margin: 20px 0; 
    word-break: break-all; 
    user-select: all; 
    font-weight: bold;
    text-align: center;
}