/* =============================================================================
   UG EDITORIAL TOOLS DESIGN SYSTEM
   ============================================================================= */

/* Font Face Declarations */
@font-face {
    font-family: 'Muse Display Harmony';
    src: url('/fonts/muse-display/MuseDisplay-Harmony.woff2') format('woff2'),
         url('/fonts/muse-display/MuseDisplay-Harmony.woff') format('woff'),
         url('/fonts/muse-display/MuseDisplay-Harmony.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Muse Sans';
    src: url('/fonts/muse-sans/MuseSansVF.woff2') format('woff2'),
         url('/fonts/muse-sans/MuseSansVF.woff') format('woff'),
         url('/fonts/muse-sans/MuseSansVF.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =============================================================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================================================= */

:root {
    /* Ultimate Guitar Design System Colors */
    --ug-color-accent-yellow: #ffd706;
    --ug-color-accent-red: #ff6e68;
    --ug-color-accent-green: #3cd556;
    --ug-color-bg-primary: #0d0d10;
    --ug-color-bg-secondary: #1a1a1d;
    --ug-color-bg-tertiary: #262629;
    --ug-color-bg-inverse: #f2f2f5;
    --ug-color-text-primary: #d9d9dc;
    --ug-color-text-secondary: #8c8c8f;
    --ug-color-text-muted: #666669;
    --ug-color-button-primary: #ffd706;
    --ug-color-button-secondary: #262629;
    --ug-color-divider-alpha: rgba(255, 255, 255, 0.12);
    
    /* Gradients using UG colors */
    --primary-gradient: linear-gradient(135deg, var(--ug-color-accent-yellow) 0%, #e6c200 100%);
    --secondary-gradient: linear-gradient(135deg, var(--ug-color-accent-green) 0%, #2ba044 100%);
    --accent-gradient: linear-gradient(135deg, var(--ug-color-accent-red) 0%, #e55a54 100%);
    --background-gradient: linear-gradient(135deg, #0a0a0d 0%, #111114 100%);
    
    /* Layout variables */
    --surface: var(--ug-color-bg-primary);
    --surface-elevated: var(--ug-color-bg-secondary);
    --border-light: var(--ug-color-bg-tertiary);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 8px;
}

/* Light theme support */
html[data-theme='light'] {
    --ug-color-accent-red: #d32139;
    --ug-color-accent-green: #017b22;
    --ug-color-bg-primary: #ffffff;
    --ug-color-bg-secondary: #eaeaed;
    --ug-color-bg-tertiary: #d9d9dc;
    --ug-color-bg-inverse: #141417;
    --ug-color-text-primary: #141417;
    --ug-color-text-secondary: #666669;
    --ug-color-divider-alpha: rgba(0, 0, 0, 0.12);
    --background-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */

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

body {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    color: var(--ug-color-text-primary);
    line-height: 1.6;
}

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

/* Universal Header */
.universal-header {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-brand {
    font-family: 'Muse Display Harmony', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 101;
}

.nav-logo {
    height: 28px;
    width: auto;
    fill: var(--ug-color-accent-yellow);
    flex-shrink: 0;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--ug-color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    color: var(--ug-color-text-primary);
    background: var(--surface-elevated);
}

.nav-link.logout {
    color: var(--ug-color-accent-red);
    border: 1px solid rgba(231, 76, 60, 0.2);
    background: rgba(231, 76, 60, 0.05);
}

.nav-link.logout:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--ug-color-accent-red);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ug-color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    z-index: 102;
}

.mobile-menu-toggle:hover {
    background: var(--surface-elevated);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    background: var(--surface);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--ug-color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--surface-elevated);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: var(--ug-color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-nav-link:hover {
    color: var(--ug-color-text-primary);
    background: var(--surface-elevated);
}

.mobile-nav-link.logout {
    color: var(--ug-color-accent-red);
    border: 1px solid rgba(231, 76, 60, 0.2);
    background: rgba(231, 76, 60, 0.05);
    margin-top: 1rem;
}

.mobile-nav-link.logout:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--ug-color-accent-red);
}

/* =============================================================================
   LAYOUT & CONTAINERS
   ============================================================================= */

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: 'Muse Display Harmony', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 0rem;
    padding-bottom: 0rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    color: var(--ug-color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Muse Display Harmony', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--ug-color-text-primary);
    margin: 0;
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.section-icon.headlines {
    background: var(--primary-gradient);
}

.section-icon.prompts {
    background: var(--secondary-gradient);
}

.section-icon.radar {
    background: var(--accent-gradient);
}

.section-icon.results {
    background: var(--secondary-gradient);
}

.section-icon.history {
    background: var(--accent-gradient);
}

.section-icon.about {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* =============================================================================
   GRID SYSTEMS
   ============================================================================= */

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    justify-content: center;
}

/* Override with specific column counts */
.tool-grid[data-columns="2"] {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    justify-content: center;
}

.tool-grid[data-columns="3"] {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    justify-content: center;
}

.tool-grid[data-columns="4"] {
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    justify-content: center;
}

.tool-grid[data-columns="5"] {
    grid-template-columns: repeat(5, minmax(280px, 1fr));
    justify-content: center;
}

/* Generator Grid */
.generators-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

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

/* History Grid */
.history-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Score Breakdown Grid */
.score-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Mini Breakdown Grid */
.mini-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

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

/* =============================================================================
   CARD COMPONENTS
   ============================================================================= */

/* Tool Cards */
.tool-card {
    background: var(--ug-color-bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--ug-color-bg-tertiary);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    font-size: 1.7rem;
    color: var(--ug-color-text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-content {
    flex: 1;
}

.tool-card:hover .tool-icon {
    background: var(--primary-gradient);
    color: var(--ug-color-bg-primary);
    transform: scale(1.05);
}

.tool-name {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tool-description {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ug-color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Generator Cards */
.generator-card {
    background: var(--ug-color-bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: block;
    text-decoration: none;
    color: inherit;
}

.generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.generator-card:hover::before {
    transform: scaleX(1);
}

.generator-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--ug-color-bg-tertiary);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: var(--ug-color-text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.generator-card:hover .card-icon {
    background: var(--secondary-gradient);
    color: var(--ug-color-bg-primary);
    transform: scale(1.05);
}

.card-body {
    flex: 1;
}

.card-description {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ug-color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-block;
    background: var(--secondary-gradient);
    color: var(--ug-color-bg-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.card-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Result Cards */
.result-card {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

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

.result-length {
    font-weight: 600;
    color: var(--ug-color-text-primary);
    font-size: 1.1rem;
}

.result-content {
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--ug-color-text-primary);
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--ug-color-accent-yellow);
}

.result-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.char-count {
    color: var(--ug-color-text-secondary);
    font-weight: 500;
}

.chars-removed {
    color: var(--ug-color-accent-red);
    font-weight: 600;
}

/* History Cards */
.history-card {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
}

.history-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.history-timestamp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ug-color-text-secondary);
    font-weight: 500;
}

.history-timestamp i {
    color: var(--ug-color-accent-yellow);
}

.history-content {
    margin-bottom: 1rem;
}

.history-headline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.history-preview {
    font-size: 0.9rem;
    color: var(--ug-color-text-secondary);
    line-height: 1.4;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--ug-color-accent-green);
}

.history-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Info Cards */
.info-card,
.simulator-card,
.scorer-card,
.category-card,
.score-overview,
.feedback-section,
.ai-assistance-section {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

/* Radar Source Cards */
.radar-source {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.radar-source:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--ug-color-bg-tertiary);
}

.source-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}

.source-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.source-title {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    margin: 0;
    line-height: 1.3;
}

/* =============================================================================
   TYPOGRAPHY & PAGE HEADERS
   ============================================================================= */

/* Page Titles */
h1 {
    font-family: 'Muse Display Harmony', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    font-family: 'Muse Display Harmony', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 4rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.page-description {
    font-size: 1.1rem;
    color: var(--ug-color-text-secondary);
    margin: 0;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

.section-description {
    font-size: 1.1rem;
    color: var(--ug-color-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* =============================================================================
   BUTTON SYSTEM
   ============================================================================= */

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--ug-color-bg-primary);
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background: var(--surface);
    color: var(--ug-color-text-primary);
    border: 1px solid var(--border-light);
}

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

.btn-ai {
    background: linear-gradient(135deg, #10a37f 0%, #1a7f64 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.reuse-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--ug-color-accent-yellow);
    color: var(--ug-color-bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reuse-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Show More Container */
.show-more-container {
    text-align: center;
    margin-top: 20px;
    padding: 1rem 0;
}

/* Show More Button */
#show-more-btn {
    background: var(--surface-elevated);
    color: var(--ug-color-text-primary);
    border: 1px solid var(--border-light);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

#show-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

#show-more-btn:hover::before {
    transform: scaleX(1);
}

#show-more-btn:hover {
    background: var(--ug-color-bg-tertiary);
    border-color: var(--ug-color-bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--ug-color-text-primary);
}

#show-more-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

#show-more-btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

/* Icon rotation when expanded */
#show-more-btn .fa-chevron-up {
    transform: rotate(180deg);
}

/* History Grid More */
.history-grid-more {
    margin-top: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #show-more-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    #show-more-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        min-width: 160px;
    }
    
    .show-more-container {
        margin-top: 15px;
    }
}

/* =============================================================================
   BADGE SYSTEM
   ============================================================================= */

.result-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-badge.truncated {
    background: rgba(255, 110, 104, 0.1);
    color: var(--ug-color-accent-red);
    border: 1px solid rgba(255, 110, 104, 0.2);
}

.result-badge.full {
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
    border: 1px solid rgba(60, 213, 86, 0.2);
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.default {
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
    border: 1px solid rgba(60, 213, 86, 0.2);
}

.category-badge.new {
    background: rgba(255, 215, 6, 0.1);
    color: var(--ug-color-accent-yellow);
    border: 1px solid rgba(255, 215, 6, 0.2);
}

.category-badge.coming-soon {
    background: rgba(140, 140, 143, 0.1);
    color: var(--ug-color-text-muted);
    border: 1px solid rgba(140, 140, 143, 0.2);
}

.history-score-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    user-select: none;
    min-height: 36px;
    white-space: nowrap;
}

.history-score-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.history-score-badge.score-excellent {
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
    border: 1px solid rgba(60, 213, 86, 0.2);
}

.history-score-badge.score-good {
    background: rgba(255, 215, 6, 0.1);
    color: var(--ug-color-accent-yellow);
    border: 1px solid rgba(255, 215, 6, 0.2);
}

.history-score-badge.score-fair {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.history-score-badge.score-poor {
    background: rgba(255, 110, 104, 0.1);
    color: var(--ug-color-accent-red);
    border: 1px solid rgba(255, 110, 104, 0.2);
}

.history-category-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(140, 140, 143, 0.15);
    color: #8C8C8F;
    border: 1px solid rgba(140, 140, 143, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    white-space: nowrap;
    font-style: normal;
}

/* =============================================================================
   FORM COMPONENTS
   ============================================================================= */

.headline-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-label {
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--ug-color-accent-yellow);
}

.form-field-wrapper {
    position: relative;
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ug-color-text-primary);
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--ug-color-accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 6, 0.1);
}

.form-textarea::placeholder {
    color: var(--ug-color-text-muted);
}

.form-select {
    width: auto;
    min-width: 200px;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ug-color-text-primary);
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238c8c8f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--ug-color-accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 6, 0.1);
}

.form-select:hover {
    border-color: var(--ug-color-bg-tertiary);
}

.form-select option {
    background: var(--ug-color-bg-secondary);
    color: var(--ug-color-text-primary);
    padding: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Character Counter */
.char-counter {
    position: absolute;
    bottom: -1.5rem;
    right: 0;
    font-size: 0.875rem;
    color: var(--ug-color-text-secondary);
    font-weight: 500;
}

.char-counter.over-limit {
    color: var(--ug-color-accent-red);
    font-weight: 600;
}

.char-counter.optimal {
    color: var(--ug-color-accent-green);
    font-weight: 600;
}

/* Category Selection */
.category-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.category-option {
    position: relative;
}

.category-option.disabled {
    opacity: 0.6;
}

.category-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
}

.category-option:not(.disabled) .category-label:hover {
    border-color: var(--ug-color-accent-yellow);
    background: var(--surface-elevated);
}

.category-option input[type="radio"]:checked + .category-label {
    border-color: var(--ug-color-accent-yellow);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 3px rgba(255, 215, 6, 0.1);
}

.category-info {
    flex: 1;
}

.category-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    margin: 0;
    line-height: 1.2;
}

.category-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--ug-color-text-secondary);
    line-height: 1.4;
}

/* =============================================================================
   NAVIGATION COMPONENTS
   ============================================================================= */

/* Category Navigation */
.category-nav {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.category-nav-list {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.category-nav-item {
    flex: 0 0 auto;
}

.category-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: 'Muse Sans', 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ug-color-text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    height: 48px;
    box-sizing: border-box;
}

.category-nav-link .category-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.375rem;
    flex-shrink: 0;
    line-height: 1;
    height: fit-content;
}

.category-nav-link i {
    font-size: 1rem;
    flex-shrink: 0;
}

.category-nav-link:hover {
    color: var(--ug-color-text-primary);
    background: var(--surface);
    border-color: var(--border-light);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.category-nav-link.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-nav-link.coming-soon:hover {
    color: var(--ug-color-text-secondary);
    background: transparent;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.category-nav-link.active {
    color: var(--ug-color-bg-primary) !important;
    background: var(--primary-gradient) !important;
    font-weight: 600 !important;
    font-variation-settings: 'wght' 600 !important;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.category-nav-link.active:hover {
    color: var(--ug-color-bg-primary);
    background: var(--primary-gradient);
    font-weight: 600 !important;
    box-shadow: var(--shadow-md);
}

/* Radar Navigation */
.radar-nav {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    justify-content: center;
}

.radar-nav {
    display: flex;
    gap: 0.5rem;
}

.radar-nav-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ug-color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.radar-nav-link i {
    font-size: 1rem;
    flex-shrink: 0;
}

.radar-nav-link:hover {
    color: var(--ug-color-text-primary);
    background: var(--surface);
    text-decoration: none;
}

.radar-nav-link.active {
    color: var(--ug-color-bg-primary);
    background: var(--primary-gradient);
    font-weight: 600;
}

.radar-nav-link.active:hover {
    color: var(--ug-color-bg-primary);
    background: var(--primary-gradient);
}

/* Source Links */
.source-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-links li {
    border-bottom: 1px solid var(--border-light);
}

.source-links li:last-child {
    border-bottom: none;
}

.source-links a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: var(--ug-color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 1.75rem;
}

.source-links a:hover {
    color: var(--ug-color-text-primary);
    background: var(--surface);
    border-left-color: var(--ug-color-accent-yellow);
    text-decoration: none;
    /* Remove the padding-left change - it's now fixed above */
}

.source-links a:active {
    background: var(--ug-color-bg-tertiary);
}

/* Error message styling */
.error-message {
    padding: 0.875rem 1.5rem;
    color: var(--ug-color-text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

/* =============================================================================
   SCORING COMPONENTS
   ============================================================================= */

/* Score Display */
.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.score-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.score-value.score-excellent {
    background: linear-gradient(135deg, var(--ug-color-accent-green) 0%, #4caf50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-value.score-good {
    background: linear-gradient(135deg, var(--ug-color-accent-yellow) 0%, #ffc107 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-value.score-fair {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-value.score-poor {
    background: linear-gradient(135deg, var(--ug-color-accent-red) 0%, #d32f2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-max {
    font-size: 2rem;
    font-weight: 600;
    color: var(--ug-color-text-secondary);
}

.score-bar-container {
    position: relative;
}

.score-bar {
    width: 100%;
    height: 12px;
    background: var(--ug-color-bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 6px;
    transition: width 0.8s ease;
}

/* Score Breakdown */
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.breakdown-item.has-points {
    border-color: var(--ug-color-accent-green);
    background: rgba(60, 213, 86, 0.05);
}

.breakdown-item.negative-points {
    border-color: var(--ug-color-accent-red);
    background: rgba(255, 110, 104, 0.05);
}

.breakdown-item.no-points {
    opacity: 0.6;
}

.breakdown-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.breakdown-item.has-points .breakdown-icon {
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
}

.mini-breakdown-item.negative-points {
    background: rgba(255, 110, 104, 0.05) !important;
    border-color: rgba(255, 110, 104, 0.2) !important;
    opacity: 1 !important;
}

.mini-breakdown-item.negative-points .mini-score {
    color: #ef4444 !important; /* Same red as used in breakdown-item.negative-points */
    font-weight: 600 !important;
}

.breakdown-item.negative-points .breakdown-icon {
    background: rgba(255, 110, 104, 0.1);
    color: var(--ug-color-accent-red);
}

.breakdown-item.no-points .breakdown-icon {
    background: var(--ug-color-bg-tertiary);
    color: var(--ug-color-text-muted);
}

.breakdown-content {
    flex: 1;
}

.breakdown-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ug-color-text-secondary);
    margin-bottom: 0.25rem;
}

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

/* Mini Breakdown */
.mini-breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 0.75rem;
}

.mini-breakdown-item.has-points {
    background: rgba(60, 213, 86, 0.05);
    border-color: rgba(60, 213, 86, 0.2);
}

.mini-breakdown-item.no-points {
    opacity: 0.5;
}

.mini-label {
    font-weight: 500;
    color: var(--ug-color-text-secondary);
    text-align: center;
    line-height: 1.2;
}

.mini-score {
    font-weight: 600;
    color: var(--ug-color-text-primary);
}

.mini-breakdown-item.has-points .mini-score {
    color: var(--ug-color-accent-green);
}

/* Score Guidelines */
.score-guidelines {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.score-guide-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-range {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.score-range.excellent {
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
    border: 1px solid rgba(60, 213, 86, 0.2);
}

.score-range.good {
    background: rgba(255, 215, 6, 0.1);
    color: var(--ug-color-accent-yellow);
    border: 1px solid rgba(255, 215, 6, 0.2);
}

.score-range.fair {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.score-range.poor {
    background: rgba(255, 110, 104, 0.1);
    color: var(--ug-color-accent-red);
    border: 1px solid rgba(255, 110, 104, 0.2);
}

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

.toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* Score Thresholds */
.score-thresholds {
    position: relative;
    margin-top: 0.5rem;
}

.score-threshold {
    position: absolute;
    transform: translateX(-50%);
}

.threshold-line {
    width: 2px;
    height: 8px;
    background: var(--ug-color-text-secondary);
    margin: 0 auto 0.25rem;
}

.threshold-label {
    font-size: 0.75rem;
    color: var(--ug-color-text-secondary);
    font-weight: 600;
    text-align: center;
}

/* =============================================================================
   INFO & MESSAGE COMPONENTS
   ============================================================================= */

/* Info Headers */
.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-header i {
    color: var(--ug-color-accent-yellow);
    font-size: 1.25rem;
}

.info-header h3 {
    margin: 0;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
}

.info-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--ug-color-text-secondary);
}

.info-content h4 {
    margin: 2rem 0 1rem 0;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-content h4::before {
    content: '';
    width: 3px;
    height: 1.25rem;
    background: var(--primary-gradient);
    border-radius: 2px;
    flex-shrink: 0;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.info-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    line-height: 1.5;
    color: var(--ug-color-text-secondary);
    transition: all 0.3s ease;
}

.info-content li:hover {
    background: var(--surface-elevated);
    border-color: var(--ug-color-bg-tertiary);
    transform: translateY(-1px);
}

.info-content li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(60, 213, 86, 0.1);
    color: var(--ug-color-accent-green);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-content li strong {
    color: var(--ug-color-text-primary);
    font-weight: 600;
}

/* Warning and Notice Messages */
.warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 110, 104, 0.05);
    border: 1px solid rgba(255, 110, 104, 0.1);
    border-radius: var(--radius-sm);
    margin: 0;
}

.warning-notice i {
    color: var(--ug-color-accent-red);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.warning-notice strong {
    color: var(--ug-color-text-primary);
}

.feedback-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 215, 6, 0.05);
    border: 1px solid rgba(255, 215, 6, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.feedback-note i {
    color: var(--ug-color-accent-yellow);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Feedback Content */
.feedback-content {
    line-height: 1.6;
}

.feedback-content .positive {
    color: var(--ug-color-accent-green);
    font-weight: 500;
}

.feedback-content .negative {
    color: var(--ug-color-accent-red);
    font-weight: 500;
}

.feedback-content .neutral {
    color: var(--ug-color-text-secondary);
    font-weight: 500;
}

.feedback-content p {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    color: var(--ug-color-text-primary) !important;
}

.feedback-content p span {
    color: var(--ug-color-text-primary) !important;
}

/* AI Assistance */
.ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-header i {
    color: var(--ug-color-accent-yellow);
    font-size: 1.25rem;
}

.ai-header h3 {
    margin: 0;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ug-color-text-primary);
}

.ai-actions {
    margin-top: 1.5rem;
}

.ai-logo {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

/* Temp Mode Indicators */
.info-banner.temp-mode {
    background: rgba(23, 162, 184, 0.1) !important;
    border: 1px solid rgba(23, 162, 184, 0.3) !important;
    color: #ffffff !important;
    padding: 1rem 1.25rem !important;
    border-radius: 6px !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 800px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    font-size: 0.95rem !important;
}

.info-banner.temp-mode i {
    color: #17a2b8 !important;
    font-size: 1.1rem !important;
}

.normal-mode-link {
    color: #17a2b8 !important;
    text-decoration: underline !important;
    margin-left: 0.5rem !important;
    font-weight: 500 !important;
}

.normal-mode-link:hover {
    color: #ffffff !important;
}

.temp-indicator {
    color: #17a2b8 !important;
    font-weight: 400 !important;
    font-size: 0.9em !important;
    margin-left: 0.5rem !important;
}

.history-mode-toggle {
    margin-left: 1rem !important;
    display: inline-block !important;
}

.history-mode-toggle a,
.history-mode-toggle a.btn,
.history-mode-toggle a.btn-outline {
    background: transparent !important;
    color: #17a2b8 !important;
    border: 2px solid #17a2b8 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.history-mode-toggle a:hover,
.history-mode-toggle a.btn:hover,
.history-mode-toggle a.btn-outline:hover {
    background: #17a2b8 !important;
    color: #ffffff !important;
    border-color: #17a2b8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3) !important;
    text-decoration: none !important;
}

.history-mode-toggle a[href*="category"]:not([href*="nosave"]):not([href*="temp"]) {
    color: #28a745 !important;
    border-color: #28a745 !important;
}

.history-mode-toggle a[href*="category"]:not([href*="nosave"]):not([href*="temp"]):hover {
    background: #28a745 !important;
    color: #ffffff !important;
    border-color: #28a745 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.history-mode-toggle .btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    font-family: 'Muse Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    height: 41px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #17a2b8 !important;
    box-shadow: inset 0 0 0 1px #17a2b8 !important;
}

.history-mode-toggle .btn-primary:hover {
    background: #17a2b8 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Success Messages */
.success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: opacity 0.3s ease;
}

.success-message-hidden {
    display: none;
    opacity: 0;
}

.success-message-visible {
    display: flex;
    opacity: 1;
}

.result-content-spaced {
    margin-top: 1.5rem;
}

/* =============================================================================
   LEGACY & SPECIFIC COMPONENTS
   ============================================================================= */

/* Category Comparison */
.category-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.category-details h4 {
    margin: 0 0 1rem 0;
    color: var(--ug-color-text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--ug-color-accent-yellow);
    padding-bottom: 0.5rem;
}

.category-specific-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--ug-color-accent-yellow);
}

.category-specific-info h4 {
    margin: 0 0 0.75rem 0;
    color: var(--ug-color-text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.category-specific-info ul {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.5;
}

.category-specific-info li {
    margin-bottom: 0.5rem;
    color: var(--ug-color-text-secondary);
}

.category-specific-info strong {
    color: var(--ug-color-text-primary);
}

/* About Section */
.about-section {
    margin-bottom: 3rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--ug-color-text-secondary);
}

.scoring-factors {
    display: grid;
    gap: 1rem;
}

.factor-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.factor-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 215, 6, 0.1);
    color: var(--ug-color-accent-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.factor-content {
    flex: 1;
    line-height: 1.5;
    color: var(--ug-color-text-secondary);
}

.factor-content strong {
    color: var(--ug-color-text-primary);
}

/* Additional Sections */
.simulator-section,
.scorer-section,
.category-section,
.results-section,
.history-section {
    margin-bottom: 3rem;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* Tablet (768px and down) */
@media (max-width: 768px) {
    .header-nav {
        padding: 0 1rem;
        height: 60px;
    }

    .nav-brand {
        font-size: 2rem;
    }

    .nav-logo {
        height: 22px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-container {
        padding: 2rem 1rem;
    }

    .hero h1, h1, .page-title {
        font-size: 2.5rem;
    }

    .hero p, .page-description {
        font-size: 1.1rem;
    }

    .section-header {
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .section-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
        text-align: center;
    }

    .section-description {
        font-size: 1rem;
        margin: 0;
        width: 100%;
        margin-top: 0.5rem;
        text-align: center;
    }

    .tool-grid,
    .generators-container,
    .results-grid,
    .category-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-grid[data-columns] {
        grid-template-columns: 1fr !important;
    }
    
    .tool-grid[data-columns] .tool-card {
        grid-column: auto !important;
        justify-self: stretch !important;
    }

    .tool-card,
    .generator-card,
    .result-card,
    .history-card {
        padding: 1.5rem;
    }

    .tool-icon,
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .result-header,
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .reuse-btn {
        position: static;
        margin-top: 1rem;
        align-self: flex-start;
    }

    .score-guidelines {
        flex-direction: column;
        gap: 0.75rem;
    }

    .score-guide-item {
        justify-content: space-between;
    }

    .score-display {
        flex-direction: column;
        gap: 0.25rem;
    }

    .score-value {
        font-size: 3rem;
    }

    .score-max {
        font-size: 1.5rem;
    }

    .score-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .mini-breakdown-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .breakdown-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .category-nav,
    .radar-nav {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .category-nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .category-nav-link,
    .radar-nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .category-nav-link i,
    .radar-nav-link i {
        font-size: 0.9rem;
    }

    .source-header {
        padding: 1rem 1.25rem 0.75rem 1.25rem;
    }

    .source-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .source-title {
        font-size: 1.1rem;
    }

    .source-links a {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    .source-links a:hover {
        padding-left: 1.5rem;
    }

    .info-content li {
        padding: 0.875rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .info-content li::before {
        align-self: flex-start;
        margin-top: 0;
    }

    .category-options {
        grid-template-columns: 1fr;
    }
    
    .category-label {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .category-badge {
        align-self: flex-end;
    }
    
    .category-comparison {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile (480px and down) */
@media (max-width: 480px) {
    .header-nav {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .nav-brand {
        font-size: 2rem;
        gap: 0.75rem;
    }

    .nav-logo {
        height: 20px;
    }

    .hero h1, h1, .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .tool-icon,
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .mobile-menu-content {
        width: 100%;
        padding: 1.5rem;
    }

    .result-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .info-card,
    .simulator-card,
    .scorer-card,
    .category-card,
    .score-overview,
    .feedback-section,
    .ai-assistance-section {
        padding: 1.5rem;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .mini-breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .breakdown-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .category-nav,
    .radar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-nav-link,
    .radar-nav-link {
        flex: 1;
        padding: 0.5rem 0.75rem;
        justify-content: center;
        font-size: 0.85rem;
    }

    .source-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .info-content h4 {
        font-size: 1rem;
    }
    
    .info-content li {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .info-content li::before {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }

    .category-card {
        padding: 1.5rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-label {
        padding: 0.75rem;
    }
    
    .category-name {
        font-size: 1rem;
    }
    
    .category-desc {
        font-size: 0.85rem;
    }

    .factor-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .factor-icon {
        align-self: center;
    }
}


/* =============================================================================
   TIKTOK CHART COMPONENTS
   ============================================================================= */

/* Chart List Container */
.chart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Chart Item */
.chart-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.chart-item:last-child {
    border-bottom: none;
}

.chart-item:hover {
    background: var(--surface);
}

.chart-item-empty {
    padding: 1.5rem;
    text-align: center;
}

.chart-empty-text {
    color: var(--ug-color-text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

/* TikTok Item Layout */
.tiktok-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.tiktok-row2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 3.5rem;
}

/* Chart Rank Badge */
.chart-rank {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--surface-elevated);
    color: var(--ug-color-text-secondary);
    border: 1px solid var(--border-light);
}

.chart-rank.rank-gold {
    background: linear-gradient(135deg, #ffd706 0%, #e6c200 100%);
    color: var(--ug-color-bg-primary);
    border-color: #ffd706;
    box-shadow: 0 2px 8px rgba(255, 215, 6, 0.3);
}

.chart-rank.rank-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: var(--ug-color-bg-primary);
    border-color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.chart-rank.rank-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b8722c 100%);
    color: var(--ug-color-bg-primary);
    border-color: #cd7f32;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

/* Chart Info */
.chart-info {
    flex: 1;
    min-width: 0;
}

.chart-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.chart-title-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ug-color-text-primary);
    line-height: 1.4;
}

.chart-title-links {
    font-size: 0.85rem;
    color: var(--ug-color-text-muted);
}

.chart-title-links a {
    color: var(--ug-color-accent-yellow);
    text-decoration: none;
    transition: all 0.2s ease;
}

.chart-title-links a:hover {
    color: var(--ug-color-text-primary);
    text-decoration: underline;
}

.chart-artist {
    font-size: 0.9rem;
    color: var(--ug-color-text-secondary);
    line-height: 1.4;
}

/* Chart Metadata Pills */
.chart-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--ug-color-text-secondary);
    white-space: nowrap;
}

.chart-meta i {
    font-size: 0.7rem;
    color: var(--ug-color-text-muted);
}

/* TikTok Page Specific */
.tiktok-page .radar-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
    .tiktok-page .radar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chart-item {
        padding: 0.875rem 1.25rem;
    }

    .tiktok-row1 {
        gap: 0.75rem;
    }

    .tiktok-row2 {
        padding-left: 0;
    }

    .chart-rank {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .chart-title-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .chart-title-text {
        font-size: 0.95rem;
    }

    .chart-title-links {
        font-size: 0.8rem;
    }

    .chart-meta {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .chart-item {
        padding: 0.75rem 1rem;
    }

    .tiktok-row2 {
        gap: 0.375rem;
    }

    .chart-meta {
        font-size: 0.65rem;
    }

    .chart-meta i {
        display: none;
    }
}