:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background Animations */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 15s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #10b981, #059669);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-50px) scale(1.1); }
}

/* Container & Glassmorphism */
.container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Result Box */
.result-container {
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    font-size: 1.2rem;
    letter-spacing: 2px;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.result-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.result-container input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    width: 100%;
    outline: none;
    font-family: inherit;
    letter-spacing: 2px;
}

.result-container .btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: color 0.3s, transform 0.2s;
}

.result-container .btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.result-container .btn:active {
    transform: scale(0.9);
}

/* Settings */
.settings {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.setting label {
    color: var(--text-muted);
    font-weight: 300;
}

/* Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 55%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    margin-top: -7px;
    transition: transform 0.2s, background-color 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Custom CSS Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 1px;
    background-color: var(--text-muted);
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent);
    border-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Generate Button */
.btn-large {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.4s ease;
}

.btn-large:hover::after {
    left: 100%;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-large:active {
    transform: translateY(1px);
}

/* Toast Animation */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}
