:root {
    --primary-color: #00d4ff;
    --primary-hover: #00b3d6;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-secondary: #a0a0a0;
    --input-bg: rgba(0, 0, 0, 0.2);
    --success-color: #00ff9d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow: hidden;
}

/* Background decoration */
body::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    z-index: -1;
}

body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -50px;
    right: -50px;
    border-radius: 50%;
    z-index: -1;
}

.main-wrapper {
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

.generator-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.password-box {
    position: relative;
    background: var(--input-bg);
    border-radius: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.password-box:focus-within {
    border-color: var(--primary-color);
}

.password-box input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    color: var(--primary-color);
    font-size: 20px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    outline: none;
    letter-spacing: 1px;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 30px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.length-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 18px;
}

/* Custom Slider */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.custom-checkbox:hover {
    color: #fff;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 22px;
    width: 22px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.checkmark svg {
    width: 14px;
    height: 14px;
    color: #1a1a2e;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox input:checked ~ .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099ff 100%);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn svg {
    transition: transform 0.5s ease;
}

.generate-btn:hover svg {
    transform: rotate(180deg);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 255, 157, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: var(--success-color);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .generator-card {
        padding: 30px 20px;
    }
}
