/**
 * GBD - Generate Bulk Domain Names
 * @version 2.0.0
 * @author Priyanka Lakhara
 * @license MIT
 */

/* CSS Variables */
:root {
    /* Colors - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fc;
    --bg-tertiary: #eef1f8;
    --text-primary: #1a1d29;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    
    /* Accent Colors */
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    
    /* UI Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 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);
    
    /* Success/Error */
    --success: #10b981;
    --error: #ef4444;
    
    /* Transitions */
    --transition-fast: 150ms;
    --transition-base: 250ms;
    --transition-slow: 350ms;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-primary: #0f1114;
    --bg-secondary: #1a1d24;
    --bg-tertiary: #252833;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-light: #334155;
    --border-medium: #475569;
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* ===== Global Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Base Styles ===== */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Set background on html to prevent white flash */
    background-color: #ffffff;
}

/* Dark mode background on html - set via inline script before CSS loads */
html.dark-ready {
    background-color: #0f1114;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* 
 * Dark Mode Transition Fix
 * Force instant theme switching - no animations to prevent half-dark/half-light bug
 * This is especially important for mobile devices where CSS transitions can be unreliable
 */

/* Disable ALL transitions during theme switch - applies to html and body */
html.theme-switching,
html.theme-switching *,
body.theme-switching,
body.theme-switching *,
body.theme-switching *::before,
body.theme-switching *::after {
    transition: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* ===== Animated Background ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.3;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite ease-in-out;
}

.sphere-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-gradient);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.sphere-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.sphere-3 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.05); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(50px, 20px) scale(1.02); }
}

/* Dark mode background adjustment */
body.dark-mode .animated-bg {
    opacity: 0.1;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: transform var(--transition-base) ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-pro {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Toggle */
.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base) ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.theme-toggle:active {
    transform: translateY(0);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    transition: all var(--transition-base) ease;
}

.sun-icon { display: block; }
.moon-icon { display: none; }

body.dark-mode .sun-icon { display: none; }
body.dark-mode .moon-icon { display: block; }

/* ===== Hero Section ===== */
.hero {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
    box-sizing: border-box;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-word {
    display: inline-block;
    animation: titleFadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.title-word:nth-child(1) { animation-delay: 0.1s; }
.title-word:nth-child(2) { animation-delay: 0.2s; }
.title-word:nth-child(3) { animation-delay: 0.3s; }

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Main Container ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-2xl);
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ===== Generator Card ===== */
.generator-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

/* Form Sections */
.form-section {
    margin-bottom: var(--space-xl);
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.mode-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.mode-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mode-selector input[type="radio"]:checked + .mode-option {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mode-icon {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-icon svg {
    width: 24px;
    height: 24px;
}

.mode-info {
    display: flex;
    flex-direction: column;
}

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

.mode-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Filter Grid */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group.full-width {
    grid-column: span 2;
}

.filter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-optional {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.filter-value {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Select Inputs */
.filter-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-sm) center;
    padding-right: var(--space-xl);
}

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

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Range Slider - Complete Redesign */
.range-container {
    position: relative;
    margin-top: var(--space-md);
    padding: var(--space-sm) 0;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    outline: none;
    position: relative;
    cursor: pointer;
}

/* Track with gradient fill effect */
.range-slider {
    background-image: linear-gradient(
        to right,
        var(--accent-primary) 0%,
        var(--accent-primary) var(--range-progress, 30%),
        var(--border-light) var(--range-progress, 30%),
        var(--border-light) 100%
    );
}

/* Webkit Thumb */
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast) ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

/* Firefox Thumb */
.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast) ease;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.range-slider::-moz-range-thumb:active {
    transform: scale(1.1);
}

/* Remove Firefox outline */
.range-slider::-moz-focus-outer {
    border: 0;
}

/* Labels */
.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
    user-select: none;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
}

.toggle-slider {
    width: 48px;
    height: 24px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-base) ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-gradient);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* TLD Section */
.tld-section {
    animation: slideDown var(--transition-slow) ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

.tld-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.tld-option {
    position: relative;
    cursor: pointer;
}

.tld-option input {
    position: absolute;
    opacity: 0;
}

.tld-badge {
    display: block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base) ease;
}

.tld-option:hover .tld-badge {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tld-option input:checked + .tld-badge {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.custom-tld {
    margin-top: var(--space-md);
}

.custom-tld-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-base) ease;
}

.custom-tld-input:hover {
    border-color: var(--accent-primary);
}

.custom-tld-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-tld-input::placeholder {
    color: var(--text-tertiary);
}

/* Quantity Section */
.quantity-container {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quantity-input {
    width: 120px;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    transition: all var(--transition-base) ease;
}

.quantity-input:hover {
    border-color: var(--accent-primary);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quantity-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quantity-divider {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

.max-option {
    cursor: pointer;
}

.max-option input {
    position: absolute;
    opacity: 0;
}

.max-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-base) ease;
}

.max-option:hover .max-badge {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.max-option input:checked + .max-badge {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: var(--space-lg);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base) ease;
    margin-top: var(--space-xl);
}

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

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: opacity var(--transition-base) ease;
}

.btn-icon {
    transition: transform var(--transition-base) ease;
}

.generate-btn:hover .btn-icon {
    transform: rotate(90deg);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--transition-base) ease;
}

.generate-btn.loading .btn-content {
    opacity: 0;
}

.generate-btn.loading .btn-loader {
    opacity: 1;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: loaderDot 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loaderDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Results Section ===== */
.results-section {
    animation: fadeIn var(--transition-slow) ease-out;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.results-info {
    display: flex;
    align-items: baseline;
    gap: var(--space-lg);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.results-stats {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.stat-badge {
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

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

.action-btn svg {
    width: 20px;
    height: 20px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.domain-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: all var(--transition-base) ease;
    cursor: pointer;
    animation: domainCardIn var(--transition-slow) ease-out forwards;
    opacity: 0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

@keyframes domainCardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.domain-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    flex: 1;
}

.domain-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-top: auto;
}

.domain-type {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex: 1;
    min-height: 36px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.domain-type svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.info-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    padding: 0;
}

.info-icon svg {
    width: 16px;
    height: 16px;
}

.info-icon:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: scale(1.1);
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base) ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: calc(100% - var(--space-xl));
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-base) ease;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: calc(100vh - var(--space-2xl));
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base) ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.modal-header {
    margin-bottom: var(--space-md);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2000;
    transform: translateX(calc(100% + var(--space-xl)));
    transition: transform var(--transition-base) ease;
}

.toast.show {
    transform: translateX(0);
}

/* ===== Footer ===== */
.footer {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    overflow: hidden;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--space-sm);
    box-sizing: border-box;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.footer-heart {
    color: var(--error);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* ===== Responsive Design ===== */

/* Tablet and below */
@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-container {
        max-width: 100%;
        padding: 0 var(--space-lg) var(--space-2xl);
    }
}

/* Mobile landscape and tablet portrait */
@media (max-width: 768px) {
    /* Prevent overflow */
    * {
        max-width: 100%;
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0;
    }
    
    /* Main Container */
    .main-container {
        padding: 0 var(--space-md) var(--space-xl);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* View Tabs Top - FIXED & CENTERED */
    .view-tabs-top {
        padding: var(--space-sm);
        gap: var(--space-xs);
        flex-wrap: wrap;
        justify-content: center;
        margin: 0 auto var(--space-lg);
        border-radius: var(--radius-lg);
        max-width: 100%;
    }
    
    .view-tabs-top .tab-btn {
        flex: 0 0 auto;
        min-width: auto;
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .view-tabs-top .tab-btn span {
        display: inline;
    }
    
    .view-tabs-top .tab-count {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    /* Generator Card */
    .generator-card {
        padding: var(--space-md);
        margin: 0;
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    
    .form-section {
        padding: var(--space-md);
        margin: 0;
    }
    
    .section-title {
        font-size: 0.95rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
    
    /* Mode Selector - Stack vertically */
    .mode-selector {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .mode-option {
        padding: var(--space-sm) var(--space-md);
        justify-content: center;
    }
    
    .mode-icon {
        width: 36px;
        height: 36px;
    }
    
    .mode-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .mode-info {
        text-align: center;
        flex: none;
    }
    
    .mode-name {
        font-size: 0.875rem;
    }
    
    .mode-desc {
        font-size: 0.7rem;
    }
    
    /* Filters */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .filter-group.full-width {
        grid-column: span 1;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-label {
        font-size: 0.8rem;
    }
    
    /* Checkbox Group */
    .checkbox-group {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
    
    .checkbox-option {
        font-size: 0.8rem;
    }
    
    /* TLD Grid */
    .tld-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--space-xs);
    }
    
    .tld-badge {
        padding: var(--space-xs);
        font-size: 0.7rem;
    }
    
    .custom-tld-input {
        font-size: 0.875rem;
    }
    
    /* Keywords */
    .keywords-input {
        min-height: 80px;
        font-size: 0.875rem;
    }
    
    /* Quantity */
    .quantity-container {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .quantity-input-group {
        justify-content: center;
    }
    
    .quantity-input {
        width: 100px;
        font-size: 1rem;
    }
    
    .quantity-divider {
        text-align: center;
    }
    
    .max-option {
        text-align: center;
    }
    
    .max-badge {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-md);
    }
    
    /* Generate Button */
    .generate-btn {
        padding: var(--space-md);
        font-size: 0.95rem;
    }
    
    /* Results Section */
    .results-section {
        padding: var(--space-md);
        margin: 0;
        border-radius: var(--radius-lg);
    }
    
    /* View Tabs in Results */
    .view-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Results Header */
    .results-header {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .results-info {
        flex-direction: column;
        gap: var(--space-xs);
        text-align: center;
        align-items: center;
    }
    
    .results-title {
        font-size: 1.125rem;
        text-align: center;
    }
    
    .results-stats {
        justify-content: center;
    }
    
    /* Results Actions */
    .results-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        width: 100%;
    }
    
    .action-btn {
        justify-content: center;
        padding: var(--space-sm);
        font-size: 0.75rem;
        min-width: 0;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Filter Bar */
    .filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .search-box {
        grid-column: 1 / -1;
    }
    
    .filter-dropdown {
        width: 100%;
        font-size: 0.8rem;
        padding: var(--space-sm);
    }
    
    .action-btn-small {
        grid-column: 1 / -1;
        justify-content: center;
    }
    
    /* Results Grid */
    .results-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    /* Domain Card */
    .domain-card {
        padding: var(--space-md);
    }
    
    .domain-name {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    .domain-type {
        font-size: 0.7rem;
    }
    
    /* Card Actions */
    .card-actions {
        gap: var(--space-sm);
    }
    
    .favorite-star,
    .info-icon {
        width: 32px;
        height: 32px;
    }
    
    .star-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Pagination */
    .pagination {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .page-numbers {
        order: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-btn {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8rem;
    }
    
    /* Modal */
    .modal-content {
        margin: var(--space-md);
        max-width: calc(100% - var(--space-xl));
        max-height: calc(100vh - var(--space-xl));
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    /* Toast */
    .toast {
        right: var(--space-md);
        left: var(--space-md);
        bottom: var(--space-md);
        font-size: 0.875rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--space-lg) var(--space-md);
    }
    
    .footer-text {
        font-size: 0.875rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 0;
    }
    
    .nav-container {
        padding: var(--space-sm) var(--space-md);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-pro {
        font-size: 0.7rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: var(--space-xs);
    }
    
    /* Hero */
    .hero {
        padding: var(--space-md) var(--space-sm);
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .title-word {
        display: inline;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Main Container */
    .main-container {
        padding: 0 var(--space-sm) var(--space-lg);
    }
    
    /* View Tabs Top - Centered */
    .view-tabs-top {
        margin: 0 auto var(--space-md);
        padding: var(--space-xs) var(--space-sm);
        justify-content: center;
    }
    
    .view-tabs-top .tab-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
    
    .view-tabs-top .tab-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .view-tabs-top .tab-count {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    /* Generator Card */
    .generator-card {
        padding: var(--space-sm);
        border-radius: var(--radius-md);
    }
    
    .form-section {
        padding: var(--space-sm);
        margin: 0;
    }
    
    .section-title {
        font-size: 0.875rem;
        text-align: center;
    }
    
    /* Mode Selector */
    .mode-option {
        padding: var(--space-sm);
        justify-content: center;
    }
    
    .mode-icon {
        width: 32px;
        height: 32px;
    }
    
    .mode-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .mode-name {
        font-size: 0.8rem;
    }
    
    .mode-desc {
        font-size: 0.65rem;
    }
    
    /* TLD Grid - 5 columns on small screens too */
    .tld-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .tld-badge {
        padding: 4px 2px;
        font-size: 0.65rem;
    }
    
    /* Keyword Section */
    .keywords-input {
        min-height: 70px;
        font-size: 0.8rem;
    }
    
    .filter-hint {
        font-size: 0.65rem;
    }
    
    /* Filter Label */
    .filter-label {
        font-size: 0.75rem;
    }
    
    .filter-optional {
        font-size: 0.6rem;
    }
    
    .filter-value {
        font-size: 0.7rem;
    }
    
    /* Range Slider */
    .range-labels {
        font-size: 0.65rem;
    }
    
    /* Quantity */
    .quantity-input {
        width: 80px;
        font-size: 0.95rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .quantity-label {
        font-size: 0.75rem;
    }
    
    .quantity-divider {
        font-size: 0.75rem;
    }
    
    .max-badge {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    /* Generate Button */
    .generate-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
    }
    
    .btn-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Results Section */
    .results-section {
        padding: var(--space-sm);
        margin: 0;
    }
    
    /* View Tabs in Results */
    .view-tabs {
        justify-content: center;
    }
    
    .tab-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
    
    .tab-count {
        font-size: 0.6rem;
        padding: 1px 5px;
    }
    
    /* Results Header */
    .results-title {
        font-size: 1rem;
        text-align: center;
    }
    
    .stat-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Results Actions - 2x2 grid */
    .results-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .action-btn {
        padding: var(--space-xs);
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Filter Bar */
    .filter-bar {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xs);
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm) var(--space-xs) calc(var(--space-md) * 2.5);
    }
    
    .search-icon {
        width: 16px;
        height: 16px;
        left: var(--space-sm);
    }
    
    .filter-dropdown {
        font-size: 0.7rem;
        padding: var(--space-xs) var(--space-lg) var(--space-xs) var(--space-sm);
    }
    
    .action-btn-small {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .action-btn-small svg {
        width: 14px;
        height: 14px;
    }
    
    /* Domain Card */
    .domain-card {
        padding: var(--space-sm);
    }
    
    .domain-name {
        font-size: 0.875rem;
        margin-bottom: var(--space-xs);
    }
    
    .domain-type {
        font-size: 0.65rem;
    }
    
    .domain-type svg {
        width: 12px;
        height: 12px;
    }
    
    /* Card Actions */
    .card-actions {
        gap: var(--space-xs);
    }
    
    .favorite-star,
    .info-icon {
        width: 28px;
        height: 28px;
    }
    
    .star-icon {
        width: 14px;
        height: 14px;
    }
    
    .info-icon svg {
        width: 14px;
        height: 14px;
    }
    
    /* Pagination */
    .pagination {
        gap: var(--space-xs);
    }
    
    .page-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
    
    .page-number {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    /* Modal */
    .modal-content {
        margin: var(--space-sm);
        padding: var(--space-md);
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-text {
        font-size: 0.875rem;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
    }
    
    /* Toast */
    .toast {
        left: var(--space-sm);
        right: var(--space-sm);
        bottom: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--space-md) var(--space-sm);
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
    
    .footer-copyright {
        font-size: 0.65rem;
    }
    
    /* History Item */
    .history-item {
        padding: var(--space-sm);
    }
    
    .history-meta {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .history-time,
    .history-count,
    .history-filters {
        font-size: 0.7rem;
    }
    
    .history-actions {
        margin-top: var(--space-xs);
    }
    
    .history-actions button {
        font-size: 0.7rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .history-meta {
        flex-direction: column;
        align-items: center;
        gap: var(--space-xs);
        text-align: center;
    }
    
    .history-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small devices (older phones) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.75rem;
    }
    
    .main-container {
        padding: 0 var(--space-xs) var(--space-md);
    }
    
    /* View Tabs Top - Centered */
    .view-tabs-top {
        margin: 0 auto var(--space-sm);
        padding: var(--space-xs);
        justify-content: center;
    }
    
    .view-tabs-top .tab-btn {
        font-size: 0.65rem;
        padding: 4px 6px;
    }
    
    .view-tabs-top .tab-btn svg {
        width: 10px;
        height: 10px;
    }
    
    .view-tabs-top .tab-count {
        font-size: 0.55rem;
        padding: 1px 3px;
    }
    
    /* Generator Card */
    .generator-card {
        padding: var(--space-xs);
    }
    
    .form-section {
        padding: var(--space-xs);
        margin: 0;
    }
    
    .section-title {
        font-size: 0.8rem;
        text-align: center;
    }
    
    /* Mode Selector */
    .mode-option {
        padding: var(--space-xs);
        justify-content: center;
    }
    
    .mode-icon {
        width: 28px;
        height: 28px;
    }
    
    .mode-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .mode-name {
        font-size: 0.75rem;
    }
    
    .mode-desc {
        font-size: 0.6rem;
        display: none;
    }
    
    /* TLD Grid */
    .tld-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }
    
    .tld-badge {
        padding: 3px 1px;
        font-size: 0.6rem;
    }
    
    /* Filters */
    .filter-select {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-lg) var(--space-xs) var(--space-sm);
    }
    
    /* Quantity */
    .quantity-input {
        width: 70px;
        font-size: 0.875rem;
    }
    
    .max-badge {
        font-size: 0.7rem;
    }
    
    /* Generate Button */
    .generate-btn {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    /* Results Section */
    .results-section {
        margin: 0;
        padding: var(--space-xs);
    }
    
    /* Results Actions */
    .results-actions {
        gap: 4px;
        justify-content: center;
    }
    
    .action-btn {
        padding: var(--space-xs);
        min-width: 0;
    }
    
    .action-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Filter Bar */
    .filter-bar {
        gap: 4px;
    }
    
    .filter-dropdown {
        font-size: 0.65rem;
        padding: var(--space-xs);
    }
    
    /* Domain Card */
    .domain-card {
        padding: var(--space-xs);
    }
    
    .domain-name {
        font-size: 0.8rem;
    }
    
    .domain-type {
        font-size: 0.6rem;
    }
    
    .favorite-star,
    .info-icon {
        width: 26px;
        height: 26px;
    }
    
    /* Pagination */
    .page-btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .page-number {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
}

/* Landscape mode on mobile */
@media (max-width: 812px) and (orientation: landscape) {
    .hero {
        padding: var(--space-md) var(--space-lg);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .modal-content {
        max-height: 90vh;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets - but respect smaller screens */
    .tab-btn {
        min-height: 40px;
    }
    
    .action-btn {
        min-height: 40px;
    }
    
    .filter-dropdown {
        min-height: 40px;
    }
    
    .tld-option {
        min-height: 36px;
    }
    
    .favorite-star,
    .info-icon {
        min-width: 36px;
        min-height: 36px;
    }
    
    /* Remove hover effects that don't work well on touch */
    .domain-card:hover {
        transform: none;
    }
    
    .action-btn:hover {
        transform: none;
    }
    
    /* Active states for touch feedback */
    .domain-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .action-btn:active {
        transform: scale(0.95);
    }
    
    .tab-btn:active {
        background: var(--bg-tertiary);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .domain-card {
        animation: none;
        opacity: 1;
    }
    
    .gradient-sphere {
        animation: none;
    }
}

/* ===== Accessibility ===== */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== New Feature Styles ===== */

/* View Tabs at Top (Always Visible) */
.view-tabs-top {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    justify-content: center;
    flex-wrap: wrap;
    box-sizing: border-box;
    max-width: 100%;
}

.view-tabs-top .tab-btn {
    margin-bottom: 0;
    border-bottom: none;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    white-space: nowrap;
}

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

.view-tabs-top .tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Keyword Section */
.keyword-section {
    animation: slideDown var(--transition-slow) ease-out;
    margin-top: var(--space-md);
}

.keywords-input {
    width: 100%;
    min-height: 100px;
    padding: var(--space-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all var(--transition-base) ease;
}

.keywords-input:hover {
    border-color: var(--accent-primary);
}

.keywords-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

/* View Tabs */
.view-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

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

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md) var(--space-sm) calc(var(--space-md) * 3);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-base) ease;
}

.search-input:hover {
    border-color: var(--accent-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-dropdown {
    padding: var(--space-sm) calc(var(--space-md) * 2) var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

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

.filter-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-btn-small {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.action-btn-small:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Favorite Star - Now inline with card actions */
.favorite-star {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    flex-shrink: 0;
}

.favorite-star:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

.star-icon {
    width: 18px;
    height: 18px;
    stroke: var(--text-tertiary);
    stroke-width: 2;
    fill: none;
    transition: all var(--transition-base) ease;
}

.favorite-star.favorited {
    background: #fef3c7;
    border-color: #f59e0b;
}

.favorite-star.favorited .star-icon {
    fill: #f59e0b;
    stroke: #f59e0b;
}

body.dark-mode .favorite-star.favorited {
    background: rgba(245, 158, 11, 0.2);
}

.star-icon-filled {
    fill: currentColor;
}

/* Card Actions Row - Star and Info button aligned */
.card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Domain Card Improvements - additional styles */

/* Card Header - Star and Info aligned horizontally */
.domain-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

/* Domain type SVG icons */
.domain-type svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    padding: 0;
    flex-shrink: 0;
}

.info-icon svg {
    width: 18px;
    height: 18px;
}

.info-icon:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    transform: scale(1.05);
}

/* Variations Button */
.variations-btn {
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    width: 100%;
}

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

.variations-list {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.variations-list .variation-item {
    padding: var(--space-xs);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast) ease;
}

.variations-list .variation-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.page-btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: var(--space-xs);
}

.page-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

.page-num:hover {
    border-color: var(--accent-primary);
}

.page-num.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* History View */
.history-item {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base) ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.history-timestamp {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.history-filters {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.history-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.history-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.history-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
}

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

/* ===== Print Styles ===== */
@media print {
    .animated-bg,
    .header,
    .hero,
    .generator-card,
    .results-header,
    .footer,
    .modal,
    .toast {
        display: none !important;
    }
    
    .results-grid {
        display: block;
    }
    
    .domain-card {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 0.5rem;
    }
}
