/* ===== 웹 디자인 도우미 CSS ===== */
/* 자동 생성일: 2026. 2. 5. */

/* ===== 폰트 Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ===== CSS Variables & Root ===== */
:root {
    /* 미니멀 모노 Color Palette */
    --color-primary: #000000;
    --color-secondary: #333333;
    --color-accent: #666666;
    --color-text: #1a1a1a;
    --color-background: #FFFFFF;

    /* Light Theme */
    --bg-primary: #FFFFFF;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-primary: #000000;
    --accent-secondary: #333333;
    --accent-gradient: linear-gradient(135deg, #000000 0%, #333333 50%, #666666 100%);
    --border-color: #eaeaea;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Font Variables */
    --font-heading: 'Poppins', 'Noto Sans KR', sans-serif;
    --font-body: 'Inter', 'Noto Sans KR', sans-serif;
}

/* Dark Theme - 미니멀 모노 */
[data-theme="dark"] {
    --color-primary: #FFFFFF;
    --color-secondary: #e0e0e0;
    --color-accent: #b0b0b0;
    --color-text: #f5f5f5;
    --color-background: #121212;

    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --accent-primary: #FFFFFF;
    --accent-secondary: #e0e0e0;
    --border-color: #333333;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-primary);
}

/* ===== App Container ===== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== Search Section ===== */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    background: var(--accent-gradient);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.search-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.search-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.search-box {
    display: flex;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--radius-lg);
    background: white;
    color: #1e293b;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    background: white;
    color: #6366f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tag-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.quick-tag {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
}

.quick-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ===== Recommendation Section ===== */
.recommendation-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recommendation-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: #ef4444;
    color: white;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.rec-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.rec-card.full-width {
    grid-column: 1 / -1;
}

.rec-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

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

.color-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.copy-btn {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

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

.font-preview {
    margin-bottom: 1rem;
}

.font-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.font-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.font-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.style-preview,
.layout-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.style-tag,
.layout-tag {
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
}

.tips-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tip-group {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.tip-group h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-group ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tip-group li {
    padding: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tip-group li::before {
    content: '•';
    color: var(--accent-primary);
}

.tip-group.avoid li::before {
    content: '✕';
    color: #ef4444;
}

/* ===== Tabs Section ===== */
.tabs-section {
    margin-bottom: 1.5rem;
}

.tabs-container {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* ===== Palettes Grid ===== */
.palettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.palette-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.palette-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.palette-colors {
    display: flex;
    height: 80px;
}

.palette-color {
    flex: 1;
    position: relative;
    transition: all var(--transition-fast);
}

.palette-color:hover {
    flex: 1.5;
}

.palette-color::after {
    content: attr(data-color);
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.palette-color:hover::after {
    opacity: 1;
}

.palette-info {
    padding: 1rem;
}

.palette-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.palette-category {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ===== Styles Grid ===== */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.style-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.style-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.style-preview-box {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.style-demo {
    width: 80%;
    height: 100px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.style-card:hover .style-demo {
    transform: scale(1.05);
}

.style-info {
    padding: 1.25rem;
}

.style-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.style-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.style-use-cases {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.use-case {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* ===== Fonts Grid ===== */
.fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.font-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.font-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.font-heading {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.font-body {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.font-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.font-names {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.font-mood {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-xl);
}

/* ===== CSS Generator ===== */
.generator-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    min-height: 500px;
}

.generator-options {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.option-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.option-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.selected-palette {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.selected-palette .color-chip {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
}

.selected-font {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.generator-output {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.output-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.copy-code-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-code-btn:hover {
    background: var(--accent-secondary);
}

.code-output {
    flex: 1;
    margin: 0;
    padding: 1.5rem;
    background: #1e1e1e;
    overflow: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.code-output code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Live Preview ===== */
.preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.device-selector {
    display: flex;
    gap: 0.5rem;
}

.device-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.device-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.device-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.template-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-selector label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.template-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.open-preview-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.open-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    min-height: 600px;
}

.preview-frame {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.preview-frame.desktop {
    width: 100%;
    max-width: 1200px;
}

.preview-frame.tablet {
    width: 768px;
}

.preview-frame.mobile {
    width: 375px;
}

.preview-content {
    min-height: 500px;
    overflow: auto;
}

/* Preview Content Styles */
.preview-hero {
    padding: 4rem 2rem;
    text-align: center;
}

.preview-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.preview-hero p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.preview-hero button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.preview-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.preview-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.preview-card p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== Responsive for new sections ===== */
@media (max-width: 900px) {
    .generator-container {
        grid-template-columns: 1fr;
    }

    .preview-frame.tablet,
    .preview-frame.mobile {
        width: 100%;
        max-width: 100%;
    }
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #22c55e;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 1.25rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 1rem;
    }

    .search-container {
        padding: 2rem 1.5rem;
    }

    .search-title {
        font-size: 1.5rem;
    }

    .search-box {
        flex-direction: column;
    }

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

    .tabs-container {
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .palettes-grid,
    .styles-grid,
    .fonts-grid {
        grid-template-columns: 1fr;
    }

    .recommendation-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== Selection ===== */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ===== Pro Badge & Pro Cards ===== */
.pro-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pro-palette,
.pro-style {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        linear-gradient(135deg, #f59e0b 0%, #d97706 100%) border-box;
}

.pro-palette:hover,
.pro-style:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.palette-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-style: italic;
}

.palette-actions {
    margin-top: 0.75rem;
}

.copy-css-btn {
    width: 100%;
    padding: 0.6rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-css-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.style-preview {
    margin: -1rem -1rem 1rem -1rem;
}

.style-keywords {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.style-best-for {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.style-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.style-actions .copy-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.style-actions .copy-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Tab Container Scroll */
.tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tabs-container::-webkit-scrollbar {
    height: 4px;
}

.tabs-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Pro Indicator in Selects */
.pro-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ===== Auto CSS & Preview Cards ===== */
.css-card,
.preview-card {
    background: var(--bg-secondary);
}

.auto-css-wrapper {
    position: relative;
}

.auto-generated-css {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.css-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.css-actions .copy-btn,
.css-actions .download-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.css-actions .copy-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

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

.css-actions .download-btn:hover {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.auto-preview-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.auto-preview-wrapper {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow: hidden;
}

[data-theme="dark"] .auto-preview-wrapper {
    background: #0f172a;
}

.auto-preview-frame {
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.auto-preview-frame.desktop {
    width: 100%;
    max-width: 100%;
}

.auto-preview-frame.tablet {
    width: 768px;
    max-width: 100%;
}

.auto-preview-frame.mobile {
    width: 375px;
    max-width: 100%;
}

.auto-preview-content {
    min-height: 300px;
    overflow: auto;
}

.open-fullscreen-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.open-fullscreen-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}