/* CSS Glassmorphism Generator — custom styles */

/* Panel */
.panel {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.panel h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
}

/* Control groups */
.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.control-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: #f9fafb;
}

/* Slider container */
.slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slider-container input[type="range"] {
    flex: 1;
    accent-color: #2563eb;
}

.slider-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    min-width: 40px;
    text-align: right;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #2563eb;
}

/* Preview container */
.preview-container {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.glass-preview-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.glass-preview-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.glass-preview-circles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.glass-preview-circles::before,
.glass-preview-circles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.glass-preview-circles::before {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
}

.glass-preview-circles::after {
    width: 150px;
    height: 150px;
    bottom: -30px;
    left: 10%;
}

#previewBox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem 2rem;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    min-width: 160px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Code output */
.code-output {
    margin-top: 0;
}

.code-output h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.code-textarea {
    width: 100%;
    min-height: 160px;
    padding: 0.75rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    background: #f9fafb;
    color: #111827;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
}

.code-textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-copy {
    width: 100%;
    justify-content: center;
}

/* How-to section */
.howto-section {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.howto-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.howto-section ol {
    padding-left: 1.25rem;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.8;
    margin: 0;
}

/* FAQ section */
.faq-section {
    margin-bottom: 1.5rem;
}

.faq-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.faq-item {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq-question {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: #f9fafb;
    color: #111827;
}

.faq-answer {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    border-top: 1px solid #e0e6ed;
}

/* Related section */
.related-section {
    margin-bottom: 1.5rem;
}

.related-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-link {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.related-link:hover {
    background: #dbeafe;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #059669;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .howto-section {
    background: #1f2937;
    border-color: #374151;
}

html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .code-output h2,
html[data-theme="dark"] .howto-section h2,
html[data-theme="dark"] .faq-section h2,
html[data-theme="dark"] .related-section h2 {
    color: #f9fafb;
}

html[data-theme="dark"] .control-group label {
    color: #d1d5db;
}

html[data-theme="dark"] .control-group input[type="color"] {
    background: #111827;
    border-color: #374151;
}

html[data-theme="dark"] .checkbox-group {
    color: #d1d5db;
}

html[data-theme="dark"] .code-textarea {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .howto-section ol {
    color: #d1d5db;
}

html[data-theme="dark"] .faq-item {
    border-color: #374151;
}

html[data-theme="dark"] .faq-question {
    background: #111827;
    color: #f9fafb;
}

html[data-theme="dark"] .faq-answer {
    color: #d1d5db;
    border-color: #374151;
}

html[data-theme="dark"] .related-link {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}
