:root {
    --primary: #00ff88;
    --primary-glow: rgba(0, 255, 136, 0.4);
    --secondary: #0066ff;
    --dark: #0a0c10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #a0a0a0;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Animations */
.background-blob {
    position: fixed;
    width: 600px;
    height: 600px;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.anim-blob-1 {
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation: move 20s infinite alternate;
}

.anim-blob-2 {
    background: var(--secondary);
    bottom: -200px;
    right: -200px;
    animation: move 25s infinite alternate-reverse;
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -2;
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
    pointer-events: none;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    object-fit: contain;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Generator Grid */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
}

@media (min-width: 1024px) {
    .generator-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.card {
    width: 100%;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--card-border);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    background: var(--card-bg);
}

.preview-section {
    position: sticky;
    top: 100px;
    /* Adjust based on header height */
}

.config-sidebar {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.config-sidebar::-webkit-scrollbar {
    width: 6px;
}

.config-sidebar::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.card-header i {
    color: var(--primary);
}

.card-header h2 {
    font-size: 1.4rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Theme Selector */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.theme-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-option span {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

.theme-preview {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.theme-option.active {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.theme-option.active span {
    color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: auto;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

/* Preview Section */
.preview-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.preview-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: fadeIn 0.5s ease;
}

.preview-success h3 {
    font-size: 1.4rem;
    color: #fff;
}

.preview-success p {
    color: rgba(255, 255, 255, 0.6);
}

/* Success Notification */
.success-notification {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.success-notification::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.success-icon {
    width: 60px !important;
    height: 60px !important;
    color: #10b981;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.success-notification h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.success-notification p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.preview-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: #1a1e26;
    border-radius: 0 0 5px 5px;
    z-index: 10;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.preview-placeholder i {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.2;
    color: var(--primary);
}

/* Code Card */
.code-card {
    margin-top: 20px;
}

.card-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    border-radius: 5px;
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.05);
}

code {
    color: #00ff88;
    line-height: 1.5;
    word-break: break-all;
    white-space: pre-wrap;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.preview-actions .btn-primary {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    font-size: 1rem;
    background: linear-gradient(90deg, #00f2fe 0%, #0077ff 100%);
    color: #fff;
}

/* Switch Toggle */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    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(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--card-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Footer */
.main-footer {
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    padding: 80px 0 0;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 25px;
}

.footer-brand p {
    color: var(--text-dim);
    line-height: 1.8;
    max-width: 400px;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--card-border);
}

.footer-socials a:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 10px 20px var(--primary-glow);
    border-color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 80px;
}

.link-group h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.link-group ul {
    list-style: none;
}

.link-group ul li {
    margin-bottom: 12px;
}

.link-group ul li a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.link-group ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

@media (max-width: 968px) {
    .generator-grid {
        max-width: 100%;
        padding: 0 10px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card {
        padding: 25px;
    }

    .button-group {
        grid-template-columns: 1fr !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto 25px;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
        gap: 40px;
    }
}