/**
 * ConvMaster - CSS Gradient Generator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--gradient {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   GRADIENT GENERATOR WIDGET
   ===================================================== */
.gradient-generator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   TYPE SELECTOR
   ===================================================== */
.gradient-generator__types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    justify-content: center;
}

.gradient-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.gradient-type-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.gradient-type-btn--selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.gradient-type-btn__icon {
    font-size: 1.5rem;
}

.gradient-type-btn__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   WORKSPACE LAYOUT
   ===================================================== */
.gradient-generator__workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (max-width: 900px) {
    .gradient-generator__workspace {
        grid-template-columns: 1fr;
    }
    
    .gradient-generator__preview-column {
        order: -1;
    }
}

.gradient-generator__config {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gradient-generator__section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.gradient-generator__section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gradient-generator__step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50%;
}

.gradient-generator__section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* =====================================================
   COLOR STOPS
   ===================================================== */
.color-stops {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.color-stop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.color-stop:hover {
    border-color: var(--primary);
}

.color-stop__number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-stop__color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.color-stop__picker {
    width: 40px;
    height: 32px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.color-stop__picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-stop__picker::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-stop__hex {
    width: 90px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.color-stop__hex:focus {
    outline: none;
    border-color: var(--primary);
}

.color-stop__position {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 80px;
}

.color-stop__position-input {
    width: 55px;
    padding: 0.5rem 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.color-stop__position-input:focus {
    outline: none;
    border-color: var(--primary);
}

.color-stop__position-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.color-stop__remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.color-stop__remove:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.color-stop__remove svg {
    width: 16px;
    height: 16px;
}

/* Add Color Stop Button */
.btn--add-stop {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
}

.btn--add-stop:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* =====================================================
   DIRECTION CONTROLS
   ===================================================== */
.direction-controls[hidden],
.radial-controls[hidden],
.conic-controls[hidden] {
    display: none !important;
}

.direction-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.direction-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.direction-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.direction-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.direction-btn:hover svg {
    color: var(--primary);
}

.direction-btn--selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.direction-btn--selected svg {
    color: var(--primary);
}

.angle-control {
    margin-top: 1rem;
}

.angle-control label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.angle-input-wrapper,
.position-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.angle-unit,
.position-unit {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =====================================================
   FORM STYLES
   ===================================================== */
.gradient-form__group {
    margin-bottom: 1rem;
}

.gradient-form__group:last-child {
    margin-bottom: 0;
}

.gradient-form__group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gradient-form__input,
.gradient-form__select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gradient-form__input:focus,
.gradient-form__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gradient-form__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.gradient-form__slider {
    width: 100%;
    height: 6px;
    appearance: none;
    background: var(--bg-secondary);
    border-radius: 3px;
    outline: none;
}

.gradient-form__slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.gradient-form__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.gradient-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* =====================================================
   PRESET GRADIENTS
   ===================================================== */
.gradient-generator__section--presets {
    background: transparent;
    padding: 0;
}

.preset-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preset-category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-category-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

.preset-category-btn--selected {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.preset-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.preset-swatch {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.preset-swatch:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

/* =====================================================
   PALETTE GENERATOR
   ===================================================== */
.gradient-generator__section--palette {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-wrapper input[type="color"] {
    width: 48px;
    height: 36px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.color-input-wrapper .gradient-form__input {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.palette-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.palette-type-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.palette-type-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.palette-type-btn--selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.palette-type-icon {
    font-size: 1rem;
}

.generated-palette {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
    min-height: 48px;
}

.palette-color {
    flex: 1;
    height: 48px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.palette-color:hover {
    transform: scale(1.05);
    z-index: 1;
}

.palette-color:first-child {
    border-radius: var(--radius-md) var(--radius-sm) var(--radius-sm) var(--radius-md);
}

.palette-color:last-child {
    border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
}

.palette-color__tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: white;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.palette-color:hover .palette-color__tooltip {
    opacity: 1;
    visibility: visible;
}

.btn--apply-palette {
    width: 100%;
}

/* =====================================================
   PREVIEW SECTION
   ===================================================== */
.gradient-generator__preview-column {
    position: sticky;
    top: 1rem;
}

.gradient-preview {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.gradient-preview__canvas {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%);
    transition: background 0.3s ease;
    /* Reset text-specific properties */
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.gradient-preview__canvas--wide {
    aspect-ratio: 16/9;
}

.gradient-preview__canvas--tall {
    aspect-ratio: 9/16;
    max-height: 400px;
    width: auto;
    margin: 0 auto;
}

.gradient-preview__canvas--circle {
    border-radius: 50%;
}

.gradient-preview__canvas--text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    /* Background set via JS */
}

/* Text span inside preview for dual gradient mode */
.gradient-preview__text {
    display: none;
}

.gradient-preview__canvas--text .gradient-preview__text {
    display: block;
}

/* Text mode controls */
.text-mode-controls {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.text-mode-controls.visible {
    display: flex;
}

.text-mode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.text-mode-row label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.text-mode-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.text-mode-input:focus {
    outline: none;
    border-color: var(--primary);
}

.text-mode-color {
    width: 40px;
    height: 32px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.text-mode-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.text-mode-color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.text-mode-toggle {
    display: flex;
    gap: 0.5rem;
}

.text-mode-toggle--three {
    gap: 0.25rem;
}

.text-mode-toggle--three .text-mode-toggle-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
}

.text-mode-toggle-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-mode-toggle-btn:hover {
    border-color: var(--primary);
}

.text-mode-toggle-btn--selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Text CSS Output */
.text-css-output {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.text-css-output__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.text-css-output__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-css-output__code {
    margin: 0;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.text-css-output__code code {
    color: inherit;
}

/* Gradient Editor Selector (for dual gradient mode) */
.gradient-editor-selector {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.gradient-editor-selector > label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.gradient-editor-toggle {
    display: flex;
    gap: 0.5rem;
}

.gradient-editor-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gradient-editor-btn:hover {
    border-color: var(--primary);
}

.gradient-editor-btn--selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.gradient-editor-btn__preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.gradient-editor-hint {
    margin: 0.5rem 0 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

.gradient-preview__resize-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Preview Modes */
.preview-modes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preview-mode-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.preview-mode-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preview-mode-btn--selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* =====================================================
   CSS OUTPUT
   ===================================================== */
.css-output {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.css-output__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.css-output__header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.css-output__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.css-output__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.css-output__toggle input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

.css-output__code {
    margin: 0;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: auto;
    max-height: 200px;
}

.css-output__code code {
    display: block;
    white-space: pre;
}

/* =====================================================
   ACTION BUTTONS
   ===================================================== */
.gradient-generator__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-secondary);
}

.btn--outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn--outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.btn--icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
}

.btn--icon:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn svg {
    flex-shrink: 0;
}

/* Privacy Info */
.gradient-preview__info {
    text-align: center;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.gradient-preview__info p {
    font-size: 0.8rem;
    color: var(--success);
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Gradient Types Grid */
.gradient-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gradient-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.gradient-type-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.gradient-type-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.gradient-type-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .gradient-generator__types {
        gap: 0.375rem;
    }
    
    .gradient-type-btn {
        padding: 0.5rem 0.75rem;
        min-width: 80px;
    }
    
    .gradient-type-btn__icon {
        font-size: 1.25rem;
    }
    
    .gradient-type-btn__name {
        font-size: 0.7rem;
    }
    
    .gradient-generator__workspace {
        padding: 1rem;
    }
    
    .direction-presets {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .preset-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .color-stop {
        flex-wrap: wrap;
    }
    
    .color-stop__position {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .palette-types {
        justify-content: center;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .gradient-form__input,
[data-theme="light"] .gradient-form__select,
[data-theme="light"] .color-stop__hex,
[data-theme="light"] .color-stop__position-input {
    background: var(--bg-primary);
}

[data-theme="light"] .gradient-generator__section {
    background: var(--bg-secondary);
}

[data-theme="light"] .gradient-preview {
    background: var(--bg-secondary);
}

[data-theme="light"] .css-output__code {
    background: #f8fafc;
}

[data-theme="light"] .color-stop {
    background: var(--bg-primary);
}

/* =====================================================
   COPY NOTIFICATION
   ===================================================== */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
