/* ============================================
   SentimentAI - Premium CSS Styling
   iPhone 15 vs Galaxy S24 Sentiment Analyzer
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;

    --positive: #10b981;
    --positive-light: rgba(16, 185, 129, 0.15);
    --neutral: #f59e0b;
    --neutral-light: rgba(245, 158, 11, 0.15);
    --negative: #ef4444;
    --negative-light: rgba(239, 68, 68, 0.15);

    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #0ea5e9 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.3) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Spacing */
    --section-padding: clamp(60px, 10vw, 120px);
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(30px, 50px) scale(1.05);
    }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 24px;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.8rem;
}

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

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 100px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--positive);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.status-text {
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 24px 80px;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 16px;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-glow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
}

/* Hero Visual - Clean Apple-style Layout */
.hero-visual {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.phone-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.phone:hover {
    transform: translateY(-10px);
}

/* Container for phone image - Fixed size for consistency */
.phone-image {
    width: 200px;
    height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    transition: all 0.4s ease;
}

.phone:hover .phone-image {
    filter: drop-shadow(0 30px 60px rgba(99, 102, 241, 0.4));
    transform: scale(1.03);
}

.phone-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* VS Badge with gradient */
.vs-badge {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transition: var(--transition-normal);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

/* Section Common Styles */
section {
    padding: var(--section-padding) 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.section-badge svg {
    opacity: 0.7;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Analyzer Section */
.analyzer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.input-panel,
.result-panel {
    padding: 32px;
}

.phone-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.phone-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

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

.phone-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.phone-icon {
    font-size: 1.1rem;
}

.textarea-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#review-input,
.compare-input {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition-normal);
}

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

#review-input::placeholder,
.compare-input::placeholder {
    color: var(--text-muted);
}

.char-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sample-reviews {
    margin-bottom: 24px;
}

.sample-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.sample-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.813rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition-normal);
}

.sample-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.analyze-btn,
.compare-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 16px;
    color: white;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.analyze-btn:hover:not(:disabled),
.compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.analyze-btn.loading .btn-text,
.analyze-btn.loading .btn-icon {
    opacity: 0;
}

.analyze-btn.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Panel */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-muted);
    text-align: center;
}

.placeholder-icon {
    margin-bottom: 16px;
    opacity: 0.3;
    stroke: var(--text-muted);
}

.result-content.hidden,
.compare-result.hidden,
.compare-summary.hidden {
    display: none;
}

.sentiment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
}

.sentiment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentiment-icon svg {
    width: 32px;
    height: 32px;
}

.sentiment-badge.positive {
    background: var(--positive-light);
    color: var(--positive);
}

.sentiment-badge.neutral {
    background: var(--neutral-light);
    color: var(--neutral);
}

.sentiment-badge.negative {
    background: var(--negative-light);
    color: var(--negative);
}

.confidence-section {
    margin-bottom: 24px;
}

.confidence-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

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

.confidence-bar,
.prob-bar,
.model-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.confidence-fill,
.prob-fill,
.model-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.confidence-fill {
    background: var(--gradient-primary);
}

.prob-fill.positive {
    background: var(--positive);
}

.prob-fill.neutral {
    background: var(--neutral);
}

.prob-fill.negative {
    background: var(--negative);
}

.probabilities-section {
    margin-bottom: 24px;
}

.probabilities-section h4,
.cleaned-text-section h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.prob-item {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.prob-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.prob-label svg {
    flex-shrink: 0;
}

.prob-value {
    font-size: 0.813rem;
    font-weight: 600;
    text-align: right;
}

.cleaned-text {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Compare Section */
.compare-container {
    display: flex;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 32px;
}

.compare-card {
    flex: 1;
    padding: 32px;
}

.compare-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.compare-phone-img {
    width: 50px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.compare-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.compare-input {
    min-height: 140px;
}

.compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.compare-btn {
    max-width: 400px;
    margin: 0 auto 32px;
}

.compare-result {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.compare-sentiment {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.compare-summary {
    padding: 24px;
    text-align: center;
}

.compare-summary h4 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

#summary-text {
    color: var(--text-secondary);
}

/* About Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.tech-card {
    padding: 32px;
    text-align: center;
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.tech-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.tech-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.model-info {
    padding: 32px;
}

.model-info h3 {
    text-align: center;
    margin-bottom: 32px;
}

.model-grid {
    max-width: 600px;
    margin: 0 auto;
}

.model-item {
    display: grid;
    grid-template-columns: 200px 1fr 50px;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

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

.model-fill {
    background: var(--primary);
}

.model-fill.best {
    background: var(--gradient-primary);
}

.model-score {
    font-weight: 600;
    color: var(--primary);
}

/* Footer */
.footer {
    padding: 60px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.footer-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tech-badge {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive Design */

/* Large Desktop */
@media (max-width: 1400px) {
    .phone-image {
        width: 140px;
        height: 280px;
    }
}

/* Medium Desktop / Large Tablet */
@media (max-width: 1200px) {
    .hero {
        gap: 40px;
    }

    .phone-image {
        width: 130px;
        height: 260px;
    }

    .phone-comparison {
        gap: 25px;
    }

    .vs-badge {
        width: 45px;
        height: 45px;
        font-size: 0.85rem;
    }

    .analyzer-container {
        gap: 24px;
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 100px;
        gap: 50px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-stats {
        justify-content: center;
    }

    .phone-image {
        width: 120px;
        height: 240px;
    }

    .phone-comparison {
        gap: 25px;
    }

    .vs-badge {
        width: 42px;
        height: 42px;
        font-size: 0.8rem;
    }

    .analyzer-container {
        grid-template-columns: 1fr;
    }

    .compare-container {
        flex-direction: column;
    }

    .compare-vs {
        transform: rotate(90deg);
        margin: 20px 0;
    }

    .cta-button {
        margin: 0 auto;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .navbar {
        padding: 14px 16px;
    }

    .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-status {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .hero {
        padding: 90px 20px 60px;
        gap: 50px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .phone-image {
        width: 100px;
        height: 200px;
    }

    .phone-comparison {
        gap: 20px;
    }

    .vs-badge {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }

    .phone-label {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .phone-selector {
        flex-direction: column;
    }

    .prob-item {
        grid-template-columns: 80px 1fr 40px;
        gap: 8px;
    }

    .model-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

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

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .compare-phone-img {
        width: 40px;
    }

    .input-panel,
    .result-panel,
    .compare-card,
    .tech-card,
    .model-info {
        padding: 24px;
    }

    #review-input,
    .compare-input {
        min-height: 140px;
    }
}

/* Mobile Landscape / Large Phone */
@media (max-width: 576px) {
    .hero {
        padding: 80px 16px 50px;
        gap: 40px;
    }

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

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .phone-image {
        width: 90px;
        height: 180px;
    }

    .phone-comparison {
        gap: 15px;
    }

    .vs-badge {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }

    .phone-label {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .cta-button {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .input-panel,
    .result-panel,
    .compare-card,
    .tech-card,
    .model-info {
        padding: 20px;
        border-radius: 16px;
    }

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

    .analyze-btn,
    .compare-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    .sentiment-badge {
        padding: 16px;
        font-size: 1.25rem;
    }

    .prob-item {
        grid-template-columns: 80px 1fr 40px;
        gap: 8px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .hero {
        padding: 75px 14px 40px;
    }

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

    .phone-image {
        width: 80px;
        height: 160px;
    }

    .phone-comparison {
        gap: 12px;
    }

    .vs-badge {
        width: 32px;
        height: 32px;
        font-size: 0.65rem;
    }

    .phone-label {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .compare-header h3 {
        font-size: 1rem;
    }

    .compare-phone-img {
        width: 35px;
    }

    .footer {
        padding: 40px 16px;
    }

    .footer-logo {
        font-size: 1.25rem;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .phone-image {
        width: 70px;
        height: 140px;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .vs-badge {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }
}

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

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

.analyzer-section,
.compare-section,
.about-section {
    animation: fadeIn 0.8s ease-out;
}

.result-content {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   INTERACTIVE ANIMATIONS & EFFECTS
   ============================================ */

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animation */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.active>*:nth-child(1) {
    animation: staggerIn 0.5s 0.1s forwards;
}

.stagger-children.active>*:nth-child(2) {
    animation: staggerIn 0.5s 0.2s forwards;
}

.stagger-children.active>*:nth-child(3) {
    animation: staggerIn 0.5s 0.3s forwards;
}

.stagger-children.active>*:nth-child(4) {
    animation: staggerIn 0.5s 0.4s forwards;
}

.stagger-children.active>*:nth-child(5) {
    animation: staggerIn 0.5s 0.5s forwards;
}

.stagger-children.active>*:nth-child(6) {
    animation: staggerIn 0.5s 0.6s forwards;
}

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

/* Pulse effect for buttons */
@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
    }
}

.pulse-effect {
    animation: pulse 2s infinite;
}

/* Glow animation */
@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
    }
}

.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* Typing cursor animation */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Floating animation for elements */
@keyframes floatUp {

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

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

.float-animation {
    animation: floatUp 3s ease-in-out infinite;
}

/* Scale up on hover */
.scale-hover {
    transition: transform 0.3s ease;
}

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

/* Shake animation for errors */
@keyframes shake {

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

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

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

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Success bounce animation */
@keyframes bounce {

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

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-8px);
    }
}

.bounce {
    animation: bounce 0.8s ease;
}

/* Confetti container */
.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 linear forwards;
}

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

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

/* Counter animation glow */
.counter-glow {
    animation: counterPulse 0.5s ease-out;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 var(--primary);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 20px var(--primary);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0 var(--primary);
    }
}

/* Particle styles */
.particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.6;
    z-index: -1;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.toast.success {
    border-color: var(--positive);
}

.toast.error {
    border-color: var(--negative);
}

/* Gradient text animation */
.animated-gradient-text {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #0ea5e9, #6366f1);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Smooth number counting */
.count-up {
    display: inline-block;
    transition: transform 0.1s ease;
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* Enhanced hover for cards */
.glass-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.1);
}

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

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

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

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

/* ============================================
   ADVANCED ENTRANCE ANIMATIONS
   ============================================ */

/* Slide in from left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from bottom */
.slide-in-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scale in animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Rotate in animation */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rotate-in.active {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Blur in animation */
.blur-in {
    opacity: 0;
    filter: blur(10px);
    transition: all 0.8s ease-out;
}

.blur-in.active {
    opacity: 1;
    filter: blur(0);
}

/* Hero specific animations */
.hero-content .badge {
    animation: fadeSlideDown 0.6s 0.2s backwards;
}

.hero-content .hero-title .title-line:first-child {
    animation: fadeSlideRight 0.8s 0.3s backwards;
}

.hero-content .hero-title .title-line:last-child {
    animation: fadeSlideRight 0.8s 0.5s backwards;
}

.hero-content .hero-subtitle {
    animation: fadeSlideUp 0.8s 0.7s backwards;
}

.hero-content .hero-stats {
    animation: fadeSlideUp 0.8s 0.9s backwards;
}

.hero-content .cta-button {
    animation: fadeSlideUp 0.8s 1.1s backwards;
}

.hero-visual {
    animation: fadeSlideLeft 1s 0.5s backwards;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

/* Phone hover effects */
.phone {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.phone:hover {
    transform: translateY(-15px) scale(1.02);
}

.phone:hover .phone-image {
    filter: drop-shadow(0 40px 60px rgba(99, 102, 241, 0.5));
}

.phone:hover .phone-label {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
}

.phone-label {
    transition: all 0.3s ease;
}

/* VS Badge pulse animation */
.vs-badge {
    animation: vsPulse 2s ease-in-out infinite;
}

@keyframes vsPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 50px rgba(139, 92, 246, 0.6);
    }
}

/* Input focus animations */
#review-input:focus,
.compare-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    transform: scale(1.01);
}

#review-input,
.compare-input {
    transition: all 0.3s ease;
}

/* Button hover enhancements */
.analyze-btn:hover,
.compare-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.analyze-btn:active,
.compare-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Section header animations */
.section-header {
    animation: none;
}

.section-badge {
    transition: all 0.3s ease;
}

.section-badge:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.15);
}

/* Tech card animations */
.tech-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.15);
}

.tech-card:hover .tech-icon {
    transform: scale(1.1) rotate(5deg);
}

.tech-icon {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Model bar animation */
.model-fill {
    animation: barGrow 1s ease-out backwards;
    transform-origin: left;
}

@keyframes barGrow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Probability bar animation */
.prob-fill {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Compare card animations */
.compare-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Navigation link underline animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link {
    position: relative;
}

/* Logo hover animation */
.logo:hover .logo-icon {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

.logo-icon {
    transition: transform 0.3s ease;
}

/* Footer animations */
.footer {
    animation: fadeSlideUp 0.8s backwards;
}

.tech-badge {
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Sample button hover */
.sample-btn:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

/* Phone selector button active state */
.phone-btn.active {
    animation: buttonActivate 0.3s ease;
}

@keyframes buttonActivate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Sentiment badge animation on result */
.sentiment-badge {
    animation: sentimentReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sentimentReveal {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

/* Confidence bar fill animation */
.confidence-fill {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll indicator */
@keyframes scrollIndicator {

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

    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* Page load animation */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE ANIMATION ADJUSTMENTS
   ============================================ */

/* Reduce animation intensity on smaller screens */
@media (max-width: 768px) {

    .hero-content .badge,
    .hero-content .hero-title .title-line,
    .hero-content .hero-subtitle,
    .hero-content .hero-stats,
    .hero-content .cta-button,
    .hero-visual {
        animation-duration: 0.5s;
    }

    .phone:hover {
        transform: translateY(-8px);
    }

    .vs-badge {
        animation: vsPulse 3s ease-in-out infinite;
    }

    .glass-card:hover {
        transform: translateY(-3px);
    }

    .tech-card:hover {
        transform: translateY(-5px);
    }

    /* Toast position for mobile */
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    /* Simpler animations on mobile */
    .phone:hover {
        transform: translateY(-5px);
    }

    .analyze-btn:hover,
    .compare-btn:hover {
        transform: translateY(-2px);
    }

    .glass-card:hover,
    .tech-card:hover {
        transform: translateY(-2px);
    }

    /* Reduce particle count on mobile (handled in JS) */
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up,
    .scale-in,
    .rotate-in,
    .blur-in {
        opacity: 1;
        transform: none;
        filter: none;
    }
}