/* Brand Name Generator Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Form Styles */
.form-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Keyword counter styling */
.keyword-counter {
    float: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: normal;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Textarea for keywords */
#keywords {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Keyword analysis panel */
.keyword-analysis {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.analysis-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Processing mode indicators */
.mode-standard {
    color: var(--success-color);
}

.mode-optimized {
    color: var(--warning-color);
}

.mode-smart-sampling {
    color: var(--info-color);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

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

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

/* Advanced Options */
.advanced-options {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.toggle-advanced {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-content {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Utility Buttons */
.utility-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

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

.sample-btn:hover {
    background: #d97706;
}

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

.theme-btn:hover {
    background: #374151;
}

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

.export-btn:hover {
    background: #059669;
}

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

.clear-btn:hover {
    background: #dc2626;
}

/* Generate button */
.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

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

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

.generate-btn i {
    margin-right: 0.5rem;
}

/* Results Section */
.results-section {
    display: none;
    margin-bottom: 3rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-controls {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Search Container */
.search-container {
    position: relative;
    max-width: 300px;
}

.search-input {
    padding-right: 2.5rem;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Loading animation */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Name Cards */
.name-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform;
}

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

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

/* Multi-keyword name card styling */
.name-card.multi-keyword {
    border-left: 4px solid var(--info-color);
}

.name-card[data-keywords="3"] {
    border-left: 4px solid var(--secondary-color);
}

.name-card[data-keywords="4"] {
    border-left-color: var(--warning-color);
}

.name-card[data-keywords="5"],
.name-card[data-keywords="6"] {
    border-left-color: var(--secondary-color);
}

.name-card[data-keywords="3"] .name-title {
    color: var(--secondary-color);
}

.name-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.name-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.name-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.copy-btn:hover {
    background: #2563eb;
}

.save-btn {
    background: var(--border-color);
    color: var(--text-secondary);
}

.save-btn:hover,
.save-btn.saved {
    background: var(--danger-color);
    color: white;
}

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

.remove-btn:hover {
    background: #dc2626;
}

/* Name Details */
.name-type {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.type-badge,
.score-badge,
.memorable-badge,
.clean-badge,
.triple-badge,
.multi-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

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

.type-compound { background: #8b5cf6; }
.type-invented { background: #06b6d4; }
.type-descriptive { background: #10b981; }
.type-abstract { background: #f59e0b; }

.score-badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.memorable-badge {
    background: var(--success-color);
    color: white;
}

.clean-badge {
    background: #06b6d4;
    color: white;
}

.triple-badge {
    background: var(--secondary-color);
    color: white;
}

.multi-badge {
    background: var(--info-color);
    color: white;
}

.name-card[data-keywords="4"] .multi-badge {
    background: var(--warning-color);
}

.name-card[data-keywords="5"] .multi-badge,
.name-card[data-keywords="6"] .multi-badge {
    background: var(--secondary-color);
}

.name-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.name-description.complex {
    font-size: 0.9rem;
    line-height: 1.4;
    background: rgba(99, 102, 241, 0.05);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
    font-style: italic;
}

/* Domain Info */
.domain-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.domain-info.available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.domain-info.unavailable {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.domain-info .status {
    margin-left: auto;
    font-weight: 500;
}

/* Name Stats */
.name-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.name-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Saved Names Section */
.saved-section {
    display: none;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.saved-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.saved-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    font-size: 0.875rem;
    min-width: 24px;
    text-align: center;
}

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

.saved-name-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
}

.saved-name-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.saved-name-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-name-content h4 {
    margin: 0;
    color: var(--text-primary);
}

.saved-name-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-saved {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-saved i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Analytics Button */
.analytics-btn {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.analytics-btn:hover {
    background: #2563eb;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

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

.toast-error {
    background: var(--danger-color);
}

.toast-info {
    background: var(--info-color);
}

.processing-toast {
    background: var(--info-color);
    border-left: 4px solid var(--primary-color);
}

.processing-toast .fa-spin {
    animation: fa-spin 1s infinite linear;
}

.toast i {
    font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 1.5rem;
}

/* Analytics Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.type-distribution h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.type-name {
    min-width: 100px;
    font-weight: 500;
}

.distribution-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

.type-count {
    min-width: 30px;
    text-align: right;
    font-weight: 500;
    color: var(--text-secondary);
}

.domain-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.domain-stats h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Dark Theme */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    
    --border-color: #374151;
    --border-light: #4b5563;
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
}

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

/* Animation for keyword analysis appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .saved-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .results-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .name-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .name-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .utility-buttons {
        grid-template-columns: 1fr;
    }
    
    .keyword-counter {
        float: none;
        display: block;
        margin-top: 0.25rem;
    }
    
    .analysis-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .keyword-analysis {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 0;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .name-card {
        padding: 1rem;
    }
    
    .name-title {
        font-size: 1.25rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .distribution-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .type-name {
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .form-container,
    .action-btn,
    .filter-btn,
    .analytics-btn,
    .utility-buttons {
        display: none !important;
    }
    
    .results-section,
    .saved-section {
        display: block !important;
    }
    
    .name-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .results-grid,
    .saved-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

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

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-tertiary);
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-light) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover effects for interactive elements */
.interactive:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Focus-visible for better keyboard navigation */
.focus-visible:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Error states */
.error-state {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Success states */
.success-state {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.success-message {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Disabled states */
.disabled,
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Badge animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Fade in animation for dynamic content */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-in;
}

.fade-in-down {
    animation: fadeInDown 0.5s ease-in;
}

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

/* Slide animations */
.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Scale animations */
.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce animation */
.bounce {
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Shake animation for errors */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

/* Glow effect */
.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.glow-hover:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    transition: box-shadow 0.3s ease;
}

/* Text effects */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-glow {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Border animations */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: borderSlide 2s infinite;
}

@keyframes borderSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Utility classes */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

/* High performance animations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Print optimizations */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]:after {
        content: " (" attr(title) ")";
    }
    
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
}

/* Container queries support */
@supports (container-type: inline-size) {
    .container-query {
        container-type: inline-size;
    }
    
    @container (min-width: 400px) {
        .responsive-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @container (min-width: 600px) {
        .responsive-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}

/* Modern CSS features */
@supports (backdrop-filter: blur(10px)) {
    .glass-effect {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.1);
    }
}

@supports (color: color(display-p3 1 0 0)) {
    .wide-gamut {
        color: color(display-p3 0.4 0.4 0.9);
    }
}

/* CSS Grid fallbacks */
@supports not (display: grid) {
    .results-grid,
    .saved-grid,
    .analytics-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .results-grid > *,
    .saved-grid > *,
    .analytics-grid > * {
        flex: 1 1 300px;
    }
}

/* Header Navigation Styles */
.header-nav {
    margin-top: 1.5rem;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Active nav link indicator */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 1px;
}

/* Footer Links Styles */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section h3 {
    font-size: 1.5rem;
}

.footer-section h4 {
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-links a:hover,
.footer-links a:focus {
    color: white;
    transform: translateX(5px);
}

.footer-links a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover,
.social-link:focus {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.social-link:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-meta i {
    color: var(--danger-color);
    margin: 0 0.25rem;
}

/* Hero Stats Styles */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Features Section */
.features-section {
    margin: 4rem 0;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-primary);
}

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

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works-section {
    margin: 4rem 0;
    background: var(--bg-secondary);
    padding: 4rem 0;
    border-radius: var(--radius-lg);
}

.how-it-works-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-primary);
}

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

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Examples Section */
.examples-section {
    margin: 4rem 0;
}

.examples-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-primary);
}

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

.example-category {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.example-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.example-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.example-name {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    margin: 4rem 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-primary);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-primary);
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.faq-item summary:hover {
    background: var(--bg-tertiary);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

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

/* Responsive Design for Navigation and Footer */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-link {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .how-it-works-section {
        padding: 2rem 0;
    }
}
/* End of styles.css */