/* CSS Glassmorphism Generator Custom Stylesheet */

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
}

.control-panel {
    background: #07070a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control-panel h3 {
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    color: #a855f7;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.control-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.label-row label {
    font-weight: 500;
    color: #cbd5e1;
}

.value-indicator {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Custom styled range slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    transition: transform 0.1s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Color Picker Inputs */
.picker-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.picker-row input[type="color"] {
    width: 46px;
    height: 38px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.picker-row input[type="text"] {
    flex-grow: 1;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.picker-row input[type="text"]:focus {
    border-color: #a855f7;
}

/* Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-header h3 {
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    color: #cbd5e1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bg-selector {
    display: flex;
    gap: 8px;
}

.bg-btn {
    background: #07070a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.bg-btn:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
}

.bg-btn.active {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

/* Canvas Container */
.canvas-container {
    height: 340px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

/* Background Presets */
.bg-neon {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
}

.bg-ocean {
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #0c0a0f 100%);
}

.bg-mesh {
    background-color: #07070a;
    background-image: 
        radial-gradient(at 10% 20%, rgba(168, 85, 247, 0.4) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(6, 182, 212, 0.3) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(236, 72, 153, 0.25) 0px, transparent 50%);
}

.bg-checkered {
    background-color: #090a0f;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.bg-dark {
    background: #030406;
}

/* Glass Preview Card inside the canvas */
.glass-preview-card {
    max-width: 320px;
    padding: 1.5rem;
    /* Styles will be injected dynamically, leaving placeholders */
    box-sizing: border-box;
}

.card-chip {
    width: 38px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 1.25rem;
}

.card-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-details {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.25rem;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
}

.card-pill {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Code Outputs */
.code-section {
    background: #07070a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.tabs {
    display: flex;
    background: #0c0d13;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex-grow: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px;
    color: #5a5f73;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #cbd5e1;
}

.tab-btn.active {
    color: #a855f7;
    border-bottom-color: #a855f7;
    background: rgba(168, 85, 247, 0.02);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

pre {
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #a78bfa;
}

.btn-copy {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 6px;
    color: #06b6d4;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #06b6d4;
    color: #07070a;
}

/* Responsiveness */
@media (max-width: 820px) {
    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .canvas-container {
        height: 280px;
        padding: 1rem;
    }
    .glass-preview-card {
        padding: 1.25rem;
    }
}
