/* ================================================================
   SecurePass — style.css   Split-panel redesign
   ================================================================ */

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

:root {
    --accent:      #22d3ee;
    --accent-dim:  rgba(34,211,238,0.1);
    --green:       #4ade80;
    --orange:      #fb923c;
    --blue:        #60a5fa;
    --red:         #f87171;
    --font:        "Inter", system-ui, sans-serif;
    --mono:        "JetBrains Mono", "Courier New", monospace;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    background: #09090b;
}

/* ════════════════════════════════════════════════
   LEFT PANEL
   ════════════════════════════════════════════════ */
.left-panel {
    position: relative;
    width: 42%;
    min-width: 360px;
    background: linear-gradient(145deg, #0d0d14 0%, #09090b 60%);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.left-glow {
    position: absolute;
    top: -200px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34,211,238,0.09) 0%, transparent 65%);
    pointer-events: none;
}

.left-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 36px 48px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: auto;
}

.brand-logo {
    width: 34px;
    height: 34px;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.2);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #fafafa;
    letter-spacing: -0.3px;
}

/* Content */
.left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0 30px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-family: var(--mono);
    font-weight: 500;
    color: #52525b;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(74,222,128,0.18), 0 0 12px rgba(74,222,128,0.4);
    animation: pulse 2.4s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.18), 0 0 12px rgba(74,222,128,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0.08), 0 0 20px rgba(74,222,128,0.5); }
}

.left-title {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -3px;
    color: #fafafa;
    margin-bottom: 20px;
}

.title-accent {
    color: var(--accent);
    font-style: italic;
    text-shadow: 0 0 60px rgba(34,211,238,0.3);
}

.left-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #3f3f46;
    max-width: 340px;
    margin-bottom: 36px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(34,211,238,0.08);
    border: 1px solid rgba(34,211,238,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.feature-item span {
    font-size: 13px;
    color: #71717a;
    font-weight: 500;
}

/* Footer */
.left-footer {
    font-size: 11px;
    color: #3f3f46;
}

.left-footer a {
    color: #52525b;
    text-decoration: none;
    transition: color 0.15s;
}

.left-footer a:hover { color: var(--accent); }

/* ════════════════════════════════════════════════
   RIGHT PANEL
   ════════════════════════════════════════════════ */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0c0c0f;
    overflow: hidden;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 18px 36px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lang-switcher {
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: #52525b;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.5px;
}

.lang-btn.active {
    background: var(--accent);
    color: #000;
}

.lang-btn:hover:not(.active) { color: #a1a1aa; }

.right-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 36px;
    gap: 16px;
}

/* ════════════════════════════════════════════════
   CARD
   ════════════════════════════════════════════════ */
.card {
    width: 100%;
    max-width: 520px;
    background: #111114;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 0 0 1px rgba(34,211,238,0.03),
        0 4px 6px rgba(0,0,0,0.4),
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Password header */
.pw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pw-label {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    color: #3f3f46;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn-new {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    color: #71717a;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.2px;
}

.btn-new:hover {
    border-color: rgba(34,211,238,0.3);
    color: var(--accent);
    background: rgba(34,211,238,0.06);
}

/* Password display */
.pw-display {
    background: #08080a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px 20px;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    transition: border-color 0.2s;
}

.pw-display:hover { border-color: rgba(34,211,238,0.2); }

.pw-text {
    font-family: var(--mono);
    font-size: 19px;
    font-weight: 600;
    color: #e4e4e7;
    letter-spacing: 2px;
    word-break: break-all;
    line-height: 1.4;
    user-select: all;
}

/* Char color classes */
.pw-text span { display: inline; }
.ch-upper  { color: #fafafa; }
.ch-lower  { color: #a1a1aa; }
.ch-num    { color: #22d3ee; }
.ch-sym    { color: #fb923c; }
.ch-scramble {
    color: #27272a;
    animation: flicker 0.07s linear infinite;
}

@keyframes flicker {
    0%   { opacity: 0.5; }
    50%  { opacity: 1.0; }
    100% { opacity: 0.6; }
}

.pw-cursor {
    display: inline-block;
    width: 2px;
    height: 20px;
    background: var(--accent);
    border-radius: 1px;
    flex-shrink: 0;
    animation: blink 1.1s ease infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    40%, 60%  { opacity: 0.9; }
}

/* Strength */
.strength-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.strength-labels {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.strength-label {
    font-size: 10px;
    font-weight: 700;
    color: #3f3f46;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.strength-text {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.3s;
}

.strength-bar {
    flex: 1;
    display: flex;
    gap: 4px;
}

.seg {
    flex: 1;
    height: 5px;
    border-radius: 100px;
    background: #1f1f23;
    transition: background 0.35s, box-shadow 0.35s;
}

/* Copy button */
.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 11px;
    padding: 14px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s, background 0.2s;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 20px rgba(34,211,238,0.2);
}

.btn-copy:hover {
    box-shadow: 0 4px 28px rgba(34,211,238,0.4), 0 0 0 1px rgba(34,211,238,0.3);
}

.btn-copy:active { transform: scale(0.985); }

.btn-copy.success {
    background: var(--green);
    box-shadow: 0 4px 20px rgba(74,222,128,0.35);
}

/* Divider */
.card-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 18px 0;
}

/* Settings */
.setting-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.setting-row:last-child { margin-bottom: 0; }

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-label {
    font-size: 10px;
    font-weight: 700;
    color: #3f3f46;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-value {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(34,211,238,0.08);
    border: 1px solid rgba(34,211,238,0.15);
    padding: 2px 10px;
    border-radius: 6px;
    min-width: 38px;
    text-align: center;
}

/* Range slider */
input[type="range"] {
    width: 100%;
    height: 4px;
    background: #1f1f23;
    border-radius: 100px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fafafa;
    border: 2px solid #111114;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent);
    transform: scale(1.15);
}

/* Toggles */
.toggles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.toggle:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}

.toggle:has(input:checked) {
    border-color: rgba(34,211,238,0.3);
    background: rgba(34,211,238,0.05);
}

.toggle input { display: none; }

.toggle-track {
    width: 36px;
    height: 20px;
    background: #27272a;
    border-radius: 100px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle input:checked + .toggle-track { background: var(--accent); }

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: left 0.2s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.toggle input:checked + .toggle-track .toggle-thumb { left: 19px; }

.toggle-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: #52525b;
    letter-spacing: 0.4px;
    transition: color 0.2s;
}

.toggle:has(input:checked) .toggle-label { color: var(--accent); }

/* ════════════════════════════════════════════════
   INFO STRIP
   ════════════════════════════════════════════════ */
.info-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 520px;
    width: 100%;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 11px;
    color: #52525b;
    font-weight: 500;
}

.info-pill svg { color: #3f3f46; flex-shrink: 0; }

/* ════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #111114;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fafafa;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9999;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — tablet & mobile
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
    }

    body {
        flex-direction: column;
    }

    /* Left panel becomes a compact header */
    .left-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .left-inner {
        padding: 28px 24px 24px;
    }

    .left-glow {
        top: -150px;
        left: -80px;
        width: 400px;
        height: 400px;
    }

    .brand {
        margin-bottom: 0;
    }

    .left-content {
        flex: unset;
        padding: 20px 0 0;
    }

    .left-title {
        font-size: clamp(32px, 10vw, 52px);
        letter-spacing: -2px;
        margin-bottom: 12px;
    }

    .left-desc {
        font-size: 13px;
        margin-bottom: 20px;
        color: #52525b;
    }

    .feature-list {
        display: none; /* hide on small screens to save space */
    }

    .left-footer {
        display: none;
    }

    /* Right panel fills remaining space */
    .right-panel {
        flex: unset;
        overflow: visible;
    }

    .top-bar {
        padding: 14px 20px;
    }

    .right-inner {
        padding: 20px 16px 32px;
        justify-content: flex-start;
    }

    .card {
        border-radius: 16px;
        padding: 18px;
    }

    .pw-text {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .toggles {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-strip {
        gap: 6px;
    }

    .info-pill {
        font-size: 10px;
        padding: 5px 11px;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .left-title {
        font-size: 28px;
        letter-spacing: -1.5px;
    }

    .card {
        padding: 14px;
    }

    .btn-copy {
        padding: 12px 16px;
        font-size: 13px;
    }
}
