:root {
    --bg-color: #05020a;
    /* Sehr dunkles Violett fast Schwarz */
    --surface-color: rgba(36, 20, 68, 0.4);
    --surface-border: rgba(157, 78, 221, 0.3);

    --primary-color: #9d4edd;
    --primary-hover: #b05bff;
    --accent-color: #e0aaff;

    --text-main: #f8f9fa;
    --text-muted: #adb5bd;

    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;

    --font-family: 'Outfit', sans-serif;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.glow-purple {
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
    animation: pulse 10s infinite alternate;
}

.glow-black {
    bottom: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(10, 5, 20, 0.9) 0%, transparent 70%);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Layout */
.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
}

.title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Generator Card (Glassmorphism) */
.generator-card {
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

/* Result Display */
.result-container {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 5px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    font-family: monospace;
    padding: 15px 20px;
    outline: none;
    letter-spacing: 2px;
}

.result::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: var(--text-main);
    border: none;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-copy {
    background: rgba(157, 78, 221, 0.2);
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-right: 5px;
    position: relative;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

.btn-copy:active {
    transform: translateY(0);
}

.copy-notification {
    position: absolute;
    top: -40px;
    right: -10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.btn-large {
    width: 100%;
    padding: 18px;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 10px 20px rgba(157, 78, 221, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-large:hover::before {
    left: 100%;
}

.btn-large:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(157, 78, 221, 0.5);
}

.btn-large:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(157, 78, 221, 0.4);
}

.rotating {
    transition: transform 0.5s ease;
}

.btn-large:active .rotating {
    transform: rotate(180deg);
}

/* Strength Meter */
.strength-meter-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.strength-indicator {
    height: 6px;
    width: 70%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.strength-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--danger);
    transition: width 0.4s ease, background-color 0.4s ease;
    border-radius: 10px;
}

.strength-indicator[data-strength="1"]::after {
    width: 25%;
    background: var(--danger);
}

.strength-indicator[data-strength="2"]::after {
    width: 50%;
    background: var(--warning);
}

.strength-indicator[data-strength="3"]::after {
    width: 75%;
    background: var(--primary-color);
}

.strength-indicator[data-strength="4"]::after {
    width: 100%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Settings */
.settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting label {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 300;
}

/* Custom Range Slider */
.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 50%;
}

.input-range {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.8);
    transition: transform 0.2s;
}

.input-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.length-value {
    background: rgba(157, 78, 221, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 40px;
    text-align: center;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

/* Custom Checkbox Toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(157, 78, 221, 0.3);
    border-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: var(--accent-color);
    box-shadow: 0 0 8px var(--primary-color);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 5px;
    animation: slideDown 0.8s ease-out 0.4s both;
}

.footer-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.footer-link:hover {
    color: var(--text-main);
    background: rgba(157, 78, 221, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.4);
}

.footer-link:active {
    transform: translateY(0);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.container {
    animation: fadeIn 0.8s ease-out;
}

.header {
    animation: slideDown 0.6s ease-out;
}

.generator-card {
    animation: slideDown 0.8s ease-out 0.2s both;
}

/* Responsiveness */
@media (max-width: 500px) {
    .container {
        padding: 10px;
    }

    .generator-card {
        padding: 20px;
    }

    .title {
        font-size: 2.5rem;
    }

    .setting {
        flex-direction: row;
        gap: 10px;
    }

    .range-container {
        width: 45%;
    }
}