:root {
    --primary-gradient: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
    --primary-color: #111827;
    --accent-color: #3b82f6;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-border: rgba(229, 231, 235, 0.5);
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(255, 255, 255, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 255, 255, 0.8) 0px, transparent 50%);
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 25s infinite ease-in-out;
}

.bg-orb-1 {
    width: 40vw;
    height: 40vw;
    background: rgba(229, 231, 235, 0.8);
    top: -10%;
    left: 20%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 50vw;
    height: 50vw;
    background: rgba(209, 213, 219, 0.6);
    bottom: -5%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

/* Navigation */
.top-nav {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

.container {
    width: 90%;
    max-width: 500px;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

p.subtitle {
    color: var(--text-muted);
}

/* Password Display */
.password-display-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.password-display {
    width: 100%;
    padding: 1.5rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.5rem;
    color: var(--text-color);
    text-align: center;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-display:hover {
    border-color: var(--primary-color);
    background: #ffffff;
}

.copy-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.copy-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Controls */
.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Range Slider */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.length-val {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    width: 2.5em;
    text-align: right;
}

/* Checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.checkbox-label:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn svg {
    width: 24px;
    height: 24px;
}
