:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glow: 0 0 20px rgba(79, 70, 229, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.logo-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.2;
    z-index: -1;
    filter: blur(20px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-light);
    filter: drop-shadow(0 0 15px rgba(129, 140, 248, 0.6));
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin: 0;
}

header h1 span {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass Card Enhanced */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.glass-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title i {
    color: var(--primary-light);
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.5));
}

.header-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.full-width {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.form-group input, .form-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: rgba(15, 23, 42, 1);
}

/* Widget Type Selector */
.widget-type-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.type-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.type-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.type-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
    text-align: center;
}

.type-info i {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    transition: var(--transition);
}

.type-info span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.type-option input:checked + .type-info {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.1);
}

.type-option input:checked + .type-info i {
    color: var(--primary-light);
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.6));
}

.type-option input:checked + .type-info span {
    color: var(--text-main);
}

.type-option:hover .type-info {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

/* Color Picker Styling */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.color-picker-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: none;
}

.color-hex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Buttons */
.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Modern Chart Selector (Chips) */
.chart-selector-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.chart-option {
    cursor: pointer;
    position: relative;
}

.chart-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chart-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
    color: var(--text-muted);
}

.chart-option-content i {
    width: 18px;
    height: 18px;
}

.chart-option-content .check-icon {
    display: none;
    color: var(--primary-light);
}

.chart-option input:checked + .chart-option-content {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-light);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.1);
}

.chart-option input:checked + .chart-option-content .check-icon {
    display: block;
}

.chart-option input:checked + .chart-option-content .uncheck-icon {
    display: none;
}

.chart-option:hover .chart-option-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -8px rgba(79, 70, 229, 0.5);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}


.card-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Preview Section */
.badge-status {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.preview-workspace {
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    border: 1px dashed var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    margin-bottom: 2rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}

.copy-btn i {
    width: 16px;
    height: 16px;
}



#widgetPreview {
    width: 100%;
    max-width: 900px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

#widgetPreview iframe {
    width: 100%;
    border: none;
    display: block;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(79, 70, 229, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.preview-info i {
    color: var(--primary-light);
    flex-shrink: 0;
}

.preview-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Embed Code Section */
.code-container {
    background: #010409;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.code-lang {
    background: rgba(255,255,255,0.03);
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    letter-spacing: 1px;
}

.code-wrapper {
    padding: 2rem;
    position: relative;
}

.code-wrapper pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-x: auto;
    color: #e6edf3;
}

.usage-tip {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.usage-tip strong {
    color: var(--text-main);
}

/* Animations & Utilities */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#widgetPreview {
    width: 100%;
    max-width: 600px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    header h1 {
        font-size: 2.25rem;
    }
    .glass-card {
        padding: 1.5rem;
    }
}



footer {
    margin-top: 6rem;
    padding-bottom: 4rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 3rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.hidden {
    display: none !important;
}


