/* ============================================
   Glassmorphism Generator — Стили
   ============================================ */

/* ============================================
   Базовая структура
   ============================================ */
.glass-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #a8edea, #fed6e3, #d299c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: #a0a0b0;
    font-size: 1.1rem;
}

/* ============================================
   Контейнер
   ============================================ */
.glass-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

/* ============================================
   Превью
   ============================================ */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 2rem;
    min-height: 500px;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Фоны для превью */
.preview-wrapper.bg-gradient1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.preview-wrapper.bg-gradient2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.preview-wrapper.bg-gradient3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.preview-wrapper.bg-image {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23667eea" width="1200" height="800"/><circle fill="%23764ba2" cx="400" cy="300" r="200"/><circle fill="%23f093fb" cx="800" cy="500" r="250"/></svg>') center/cover;
}

/* Glass карточка */
.glass-card {
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.glass-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.glass-card p {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.glass-card button {
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-card button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Настройки превью */
.preview-settings {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.preview-setting {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #a0a0b0;
}

.preview-setting label {
    min-width: 100px;
}

.preview-setting select {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.preview-setting select option {
    background: #2a2a3e;
}

/* ============================================
   Панель управления
   ============================================ */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 1rem;
}

.controls-section::-webkit-scrollbar {
    width: 6px;
}

.controls-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.controls-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.control-title {
    color: #a8edea;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-item label {
    color: #a0a0b0;
    font-size: 0.85rem;
    font-weight: 500;
}

.control-item input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

/* ============================================
   Пресеты
   ============================================ */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.preset-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Переключатель форматов
   ============================================ */
.format-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.format-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.format-btn.active {
    background: rgba(168, 237, 234, 0.2);
    border-color: #a8edea;
    color: #a8edea;
}

/* Подсказка для Tailwind */
.format-hint {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border-left: 3px solid #38bdf8;
    border-radius: 6px;
    color: #7dd3fc;
    font-size: 0.8rem;
    line-height: 1.5;
}

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

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(168, 237, 234, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(168, 237, 234, 0.5);
}

/* ============================================
   Box с CSS кодом
   ============================================ */
.code-box {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    padding-right: 3.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #a8edea;
    overflow-x: auto;
    word-break: break-all;
    white-space: pre-wrap;
    max-height: 250px;
    overflow-y: auto;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.copy-btn.copied {
    background: rgba(76, 217, 100, 0.3);
}

/* ============================================
   Кнопки действий
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.random-btn {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #1a1a2e;
}

.random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 237, 234, 0.4);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

/* ============================================
   Адаптивность
   ============================================ */
@media (max-width: 1024px) {
    .glass-container {
        grid-template-columns: 1fr;
    }
    
    .preview-wrapper {
        min-height: 400px;
    }
    
    .controls-section {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .presets-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
}