/* LOGOCREATIVEARTS - Web Font Generator & Typography Playground UI */

:root {
    --font-studio-primary: #8B5CF6;
    --font-studio-primary-hover: #7C3AED;
    --font-studio-accent: #EC4899;
    --font-studio-border: rgba(139, 92, 246, 0.15);
    --font-studio-border-hover: rgba(139, 92, 246, 0.35);
    --font-studio-shadow: 0 4px 20px -2px rgba(139, 92, 246, 0.08);
    --font-studio-shadow-lg: 0 12px 32px -4px rgba(139, 92, 246, 0.16);
    --font-studio-radius: 16px;
}

/* Page Container & Spacing */
.font-gen-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 24px 80px 24px;
}

/* Stepper Bar */
.font-stepper-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.guided-tool-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--font-studio-border);
    border-radius: 9999px;
    padding: 6px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.guided-tool-stepper::-webkit-scrollbar {
    display: none;
}

.tool-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    cursor: default;
}

.tool-step-badge.active {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.tool-step-arrow {
    color: #cbd5e1;
    font-size: 0.85rem;
    user-select: none;
}

/* Main Workspace 2-Column Grid */
.generator-workspace {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1024px) {
    .generator-workspace {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Sticky Sidebar Controls */
.sidebar-controls {
    background: #ffffff;
    border: 1px solid var(--font-studio-border);
    border-radius: var(--font-studio-radius);
    padding: 24px;
    box-shadow: var(--font-studio-shadow);
    transition: box-shadow 0.2s ease;
}

@media (min-width: 1025px) {
    .sidebar-controls {
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
    }
    .sidebar-controls::-webkit-scrollbar {
        width: 4px;
    }
    .sidebar-controls::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.2);
        border-radius: 4px;
    }
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title-icon {
    font-size: 1.2rem;
}

/* Control Groups */
.control-group {
    margin-bottom: 18px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.control-val-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
    padding: 2px 8px;
    border-radius: 9999px;
    font-family: monospace;
}

/* Inputs & Selects */
.sidebar-controls .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #0f172a;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.sidebar-controls .form-input:focus {
    background: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    outline: none;
}

/* Modern Range Slider */
.custom-range {
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 8px 0;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #7c3aed;
}

.custom-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
    cursor: pointer;
}

/* Color Pickers Row */
.color-pickers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.color-picker-box {
    display: flex;
    flex-direction: column;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-input-wrapper:hover {
    border-color: #8b5cf6;
    background: #ffffff;
}

.color-swatch-circle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.color-picker-native {
    border: none;
    width: 100%;
    height: 32px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

/* Reset Button */
#btn-reset-font-settings {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

#btn-reset-font-settings:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Fonts Grid & Workspace View */
.font-preview-cards-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#font-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Font Card UI */
.font-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.font-card:hover {
    border-color: #c084fc;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
    transform: translateY(-3px);
}

.font-card.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25), 0 8px 24px rgba(139, 92, 246, 0.15);
}

.font-preview-box {
    padding: 30px 22px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s, color 0.2s;
}

.preview-text-render {
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
    transition: font-size 0.15s ease, letter-spacing 0.15s ease;
}

.font-details-box {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    gap: 12px;
}

.font-info-labels h5 {
    margin: 0 0 2px 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.font-info-labels span {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: capitalize;
}

.font-card-actions {
    display: flex;
    gap: 6px;
}

.font-card-actions button {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s;
}

/* CSS Workbench Panel */
#css-workbench-panel {
    background: #ffffff;
    border: 1px solid var(--font-studio-border);
    border-left: 4px solid #8b5cf6;
    border-radius: var(--font-studio-radius);
    padding: 24px 28px;
    box-shadow: var(--font-studio-shadow);
    margin-top: 10px;
}

.css-workbench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.css-workbench-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.css-workbench-sub {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.code-snippet-container {
    position: relative;
}

#code-snippet-box {
    background: #0f172a;
    color: #c7d2fe;
    padding: 20px 24px;
    border-radius: 12px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
    border: 1px solid #1e293b;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

#btn-copy-css {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75rem !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    background: #8b5cf6;
    color: #ffffff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.2s;
}

#btn-copy-css:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .font-gen-container {
        padding-top: 85px;
        padding-left: 16px;
        padding-right: 16px;
    }
    #font-preview-grid {
        grid-template-columns: 1fr;
    }
    .color-pickers-grid {
        grid-template-columns: 1fr;
    }
}
