/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #10b981;
    --color-accent: #f59e0b;

    /* Neutrals */
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-elevated: #ffffff;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;

    /* Score Colors */
    --color-score-excellent: #10b981;
    --color-score-good: #22c55e;
    --color-score-average: #f59e0b;
    --color-score-poor: #ef4444;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

input {
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

.main {
    flex: 1;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-4) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--color-text);
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
}

.logo-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    padding: var(--spacing-12) 0 var(--spacing-8);
    text-align: center;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--spacing-4);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--spacing-8);
}

/* Analyzer Card */
/* Analyzer Card & Platform Selector */
.analyzer-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    max-width: 800px;
    /* Increased width for side-by-side layout on desktop if needed */
    margin: 0 auto;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

.platform-selector {
    display: flex;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-2);
    background: var(--color-bg);
    padding: var(--spacing-1);
    border-radius: var(--radius-lg);
}

.platform-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    background: transparent;
}

.platform-tab:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.5);
}

.platform-tab.active {
    background: white;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.platform-tab[data-platform="youtube"].active {
    color: #FF0000;
}

.platform-tab[data-platform="instagram"].active {
    color: #E1306C;
}

.platform-tab[data-platform="facebook"].active {
    color: #1877F2;
}

.platform-tab[data-platform="tiktok"].active {
    color: #000000;
}

.input-section {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: var(--spacing-4);
}

.input-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-2);
    text-align: left;
}

.title-input {
    width: 100%;
    padding: var(--spacing-4);
    font-size: var(--font-size-base);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.title-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.char-count {
    position: absolute;
    right: var(--spacing-3);
    bottom: var(--spacing-3);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.analyze-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-4) var(--spacing-6);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

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

.analyze-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Mobile Preview Mockup */
.preview-container {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    padding: var(--spacing-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
    border: 1px solid var(--color-border);
}

.preview-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.phone-mockup {
    width: 280px;
    height: 500px;
    background: #000;
    border-radius: 36px;
    padding: 12px;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    border: 4px solid #333;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #000;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.app-interface {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

/* Video Placeholder */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.play-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
}

/* Overlay UI */
.overlay-ui {
    position: relative;
    z-index: 2;
    padding: 16px;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.side-actions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(4px);
}

.bottom-info {
    margin-right: 48px;
    /* Space for side actions */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.username {
    font-weight: 700;
    font-size: 0.9rem;
}

.video-title-preview {
    font-size: 0.9rem;
    line-height: 1.3;
    max-height: 2.6rem;
    /* Limit to approx 2 lines visibly */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.music-ticker {
    font-size: 0.8rem;
    opacity: 0.8;
}

.preview-note {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-align: center;
}

/* Highlighting Classes (Added via JS) */
.highlight-power {
    background-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
    padding: 0 2px;
    border-radius: 2px;
}

.highlight-neg {
    background-color: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    padding: 0 2px;
    border-radius: 2px;
    text-decoration: line-through;
}

.highlight-number {
    background-color: rgba(245, 158, 11, 0.2);
    color: #b45309;
    padding: 0 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Ad Placeholders
   ========================================================================== */

.ad-container {
    padding: var(--spacing-4) 0;
}

.ad-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.ad-placeholder span {
    opacity: 0.6;
}

/* ==========================================================================
   Results Section
   ========================================================================== */

.results-section {
    padding: var(--spacing-8) 0;
    animation: fadeIn 0.5s ease;
}

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

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

/* Overall Score */
.overall-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
    background: var(--color-bg-card);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-8);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-8);
    border: 1px solid var(--color-border);
}

.score-circle {
    position: relative;
    width: 140px;
    height: 140px;
}

.score-ring {
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 8;
}

.score-ring-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value span:first-child {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-text);
}

.score-max {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.score-info {
    text-align: center;
}

.score-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-2);
}

.score-feedback {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

/* Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-8);
}

.breakdown-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-5);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.breakdown-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-3);
}

.breakdown-icon {
    font-size: var(--font-size-xl);
}

.breakdown-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
}

.breakdown-score {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
}

.breakdown-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-3);
}

.breakdown-progress {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.8s ease, background-color 0.3s ease;
}

.breakdown-reason {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Suggestions */
.suggestions-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-8);
    border: 1px solid var(--color-border);
}

.suggestions-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-4);
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.suggestions-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
    padding: var(--spacing-3) var(--spacing-4);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.suggestions-list li::before {
    content: '💡';
    flex-shrink: 0;
}

/* Improved Titles */
.improved-titles-card,
.templates-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-6);
    border: 1px solid var(--color-border);
}

.improved-titles-header,
.templates-header {
    margin-bottom: var(--spacing-4);
}

.improved-titles-title,
.templates-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-1);
}

.templates-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.template-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
    padding: var(--spacing-4);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.template-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.template-pattern {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

.template-example {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}

.improved-titles-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    counter-reset: title-counter;
}

.improved-titles-list li {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-4);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    transition: background-color var(--transition-fast);
    cursor: pointer;
    counter-increment: title-counter;
}

.improved-titles-list li::before {
    content: counter(title-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    flex-shrink: 0;
}

.improved-titles-list li:first-child {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.improved-titles-list li:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* Copy Buttons */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.copy-btn.secondary {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

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

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

.copy-btn.primary:hover {
    background: #059669;
}

.copy-results-wrapper {
    text-align: center;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    padding: var(--spacing-12) 0;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
}

.faq-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text);
    text-align: center;
    margin-bottom: var(--spacing-2);
}

.faq-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-8);
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: var(--spacing-4) var(--spacing-5);
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: var(--font-size-xl);
    font-weight: 300;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 var(--spacing-5) var(--spacing-4);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: var(--spacing-3);
}

.faq-answer ol,
.faq-answer ul {
    margin: var(--spacing-3) 0;
    padding-left: var(--spacing-5);
}

.faq-answer li {
    list-style: disc;
    margin-bottom: var(--spacing-2);
}

.faq-answer ol li {
    list-style: decimal;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--color-text);
    color: white;
    padding-top: var(--spacing-8);
}

.footer .ad-container {
    padding: 0 0 var(--spacing-8);
}

.footer .ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
    padding-bottom: var(--spacing-8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: var(--spacing-3);
}

.footer-brand .logo-icon {
    background: white;
    color: var(--color-primary);
}

.footer-brand .logo-text {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-6);
}

.footer-links-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-3);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.footer-links a {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
    padding: var(--spacing-6) 0;
    text-align: center;
}

.copyright {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
}

.remove-ads-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.remove-ads-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

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

@media (min-width: 640px) {
    .hero-title {
        font-size: var(--font-size-4xl);
    }

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

    .improved-titles-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

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

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    .overall-score-card {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-8);
    }

    .score-circle {
        width: 160px;
        height: 160px;
    }

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

    .footer-content {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: var(--spacing-16) 0 var(--spacing-10);
    }

    .hero-title {
        font-size: 3rem;
    }

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

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast {
    position: fixed;
    bottom: var(--spacing-6);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: white;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.analyzing .analyze-btn {
    animation: pulse 1s infinite;
    pointer-events: none;
}

/* ==========================================================================
   Title History
   ========================================================================== */

.history-section {
    margin-top: var(--spacing-6);
    padding-top: var(--spacing-6);
    border-top: 1px solid var(--color-border);
}

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

.history-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
}

.clear-history-btn {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    background: none;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.clear-history-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.history-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.history-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.history-score.excellent {
    background: linear-gradient(135deg, #10b981, #059669);
}

.history-score.good {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.history-score.average {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.history-score.poor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.history-text {
    flex: 1;
    min-width: 0;
}

.history-title-text {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* ==========================================================================
   Coming Soon Badges
   ========================================================================== */

.coming-soon {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.4);
}

.coming-soon .badge {
    font-size: var(--font-size-xs);
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.current-tool {
    color: var(--color-primary-light) !important;
    font-weight: 500;
}

/* ==========================================================================
   Word Highlights
   ========================================================================== */

.word-highlight {
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.word-highlight.power {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.word-highlight.curiosity {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-primary);
}

.word-highlight.filler {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    text-decoration: line-through;
}

.word-highlight.number {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* Detected words display */
.detected-words {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    margin-top: var(--spacing-2);
}

.detected-word {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-full);
}

.detected-word.power {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.detected-word.curiosity {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

/* ==========================================================================
   Enhanced Score Colors
   ========================================================================== */

.score-excellent {
    color: #10b981 !important;
}

.score-good {
    color: #22c55e !important;
}

.score-average {
    color: #f59e0b !important;
}

.score-poor {
    color: #ef4444 !important;
}

/* Progress bar gradients */
.breakdown-progress.excellent {
    background: linear-gradient(90deg, #10b981, #059669);
}

.breakdown-progress.good {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.breakdown-progress.average {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.breakdown-progress.poor {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* ==========================================================================
   Confetti Animation
   ========================================================================== */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-100%) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ==========================================================================
   Input Shake Animation
   ========================================================================== */

@keyframes shake {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.title-input.shake {
    animation: shake 0.5s ease;
    border-color: var(--color-score-poor);
}