@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;600&display=swap');

:root {
    --bg-color: #0f172a;
    --container-bg: #1e293b;
    --primary: #a5f3fc;
    --accent: #22d3ee;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #f87171;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Password Display */
.password-display-container {
    position: relative;
    background-color: #0f172a;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    border: 1px solid #334155;
    margin-bottom: 1.5rem;
}

#passwordDisplay {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    width: 100%;
    outline: none;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

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

.copied-msg {
    position: absolute;
    top: -30px;
    right: 0;
    background-color: var(--accent);
    color: #0f172a;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.copied-msg.active {
    opacity: 1;
}

/* Strength Meter */
.strength-container {
    margin-bottom: 1.5rem;
}

.strength-container p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.strength-bar-bg {
    height: 8px;
    background-color: #334155;
    border-radius: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 50%; /* Default */
    background-color: var(--warning);
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.range-slider {
    width: 100%;
    cursor: pointer;
    accent-color: var(--accent);
}

.options-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Button */
.generate-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent);
    color: #0f172a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}