/* ─── Variables (ACTotal Theme) ─── */
:root {
    --bg: #050506;
    --surface: #111827;
    --surface-light: #1f2937;
    --surface-hover: #374151;
    --accent: #00A7E1;
    --accent-glow: rgba(0, 167, 225, 0.35);
    --text: #ffffff;
    --text-dim: #9ca3af;
    --radius: 20px;
    --radius-sm: 12px;
}

/* ─── Base Reset ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ─── Layout ─── */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Header ─── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #007bb5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .2s;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: var(--surface-light);
    color: var(--text);
}

/* ─── Main Content ─── */
.passgen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ─── Result Card ─── */
.result-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.result-box {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.password-display {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    word-break: break-all;
    letter-spacing: 0.05em;
    flex: 1;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    color: var(--accent);
    transform: scale(1.1);
}

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

.copy-toast {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--accent);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Settings Card ─── */
.settings-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Length Slider */
.length-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.length-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.length-value {
    color: var(--accent);
    background: var(--surface-light);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

.styled-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    outline: none;
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: transform 0.1s;
}

.styled-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Options Grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.option-label:hover {
    background: var(--surface-hover);
}

.option-label input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-dim);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.option-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.option-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.option-label span {
    font-weight: 500;
    color: var(--text);
    font-size: 1rem;
}

/* ─── Buttons ─── */
.btn-primary {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #007bb5);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px var(--accent-glow);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 1rem;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ─── Footer ─── */
.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: auto;
    padding-top: 2rem;
    line-height: 1.5;
}

.app-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}