/* assets/style.css - Futuristic Fluidity Design */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    /* Fluid Palette */
    --bg-deep: #030014;
    --bg-surface: #0f0c29;
    --accent-cyan: #00f2ea;
    --accent-magenta: #ff0050;
    --accent-violet: #7000ff;

    /* Text */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    /* Glassmorphism 2.0 */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shine: rgba(255, 255, 255, 0.1);
    --blur-amount: 20px;

    /* Status */
    --success: #00ff9d;
    --danger: #ff0055;
    --warning: #ffbe00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

[dir="rtl"] body,
[dir="rtl"] * {
    font-family: 'Cairo', sans-serif;
}

/* Fluid Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 242, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 0, 80, 0.1) 0%, transparent 50%);
    filter: blur(80px);
    animation: pulseBg 10s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
header {
    background: rgba(3, 0, 20, 0.8);
    backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--accent-magenta);
    text-shadow: 0 0 8px var(--accent-magenta);
}

.nav-btn {
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-violet));
    color: #000;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.5);
    color: #000;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 242, 234, 0.5));
}


/* User Menu */
.user-menu-container {
    position: relative;
}

.user-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 50px;
    transition: 0.3s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-magenta));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    background: rgba(10, 5, 30, 0.95);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(5px);
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: rgba(255, 0, 85, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .dropdown-item:hover {
    transform: translateX(-5px);
}

/* Language Switcher */
.lang-switcher {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 0.9rem;
}

.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
}

.lang-switcher a.active,
.lang-switcher a:hover {
    color: #fff;
    /* Reverted to simple white */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 0 4rem;
    position: relative;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #fff, #b4b4b4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fix Arabic text rendering - disable gradient for proper character display */
[dir="rtl"] .hero h1 {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.highlight {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

/* Steps Visualization */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    width: 100%;
}

.step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    width: 250px;
    transition: 0.3s;
    position: relative;
    backdrop-filter: blur(10px);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.1);
}

.step-icon img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.step-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-card p {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

.step-arrow {
    width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
}

.step-arrow svg {
    filter: drop-shadow(0 0 5px rgba(0, 242, 234, 0.5));
    animation: floatArrow 2s ease-in-out infinite;
}

@keyframes floatArrow {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

/* Pricing Page Styles */
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 7rem;
}

.pricing-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #b4b4b4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.pricing-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    align-items: stretch;
}

.pricing-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2.5rem 2rem;
    width: 350px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured {
    border-color: var(--accent-magenta);
    box-shadow: 0 0 30px rgba(255, 0, 80, 0.15);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 20px 50px rgba(255, 0, 80, 0.25);
}

.plan-name {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.price-tag {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.currency {
    font-size: 1.5rem;
    vertical-align: top;
    opacity: 0.8;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
}

.save-badge {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.features-list {
    list-style: none;
    margin-bottom: 2.5rem;
    text-align: left;
    /* Changed from right to left default, RTL handles flip */
    flex-grow: 1;
}

.features-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li i {
    color: var(--accent-cyan);
    font-size: 1.1rem;
}

.features-list li.disabled {
    opacity: 0.5;
}

.features-list li.disabled i {
    color: #555;
    content: "✕" !important;
    /* Simplified fallback */
}

/* RTL Support for lists */
[dir="rtl"] .features-list {
    text-align: right;
}

.pricing-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.pricing-btn.primary {
    background: linear-gradient(135deg, var(--accent-magenta), var(--accent-violet));
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 0, 80, 0.3);
}

.pricing-btn.primary:hover {
    box-shadow: 0 10px 30px rgba(255, 0, 80, 0.5);
    transform: translateY(-2px);
}

.pricing-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.pricing-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.current-plan-banner {
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.current-plan-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 234, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .pricing-container {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-10px);
    }
}

/* RTL Support for arrows */
[dir="rtl"] .step-arrow {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Force downward arrow on mobile, regardless of RTL */
    [dir="rtl"] .step-arrow,
    .step-arrow {
        width: 60px;
        height: 60px;
        background: transparent;
        transform: rotate(90deg);
    }

    .step-arrow::after {
        content: none;
    }
}

/* Glass Card (Upload & Login) */
.upload-box,
.auth-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.upload-box {
    max-width: 700px;
    width: 100%;
}

.upload-box:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.1);
    transform: translateY(-5px);
}

/* Liquid Buttons */
.action-btn,
.btn-block,
.auth-btn {
    border: none;
    border-radius: 100px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-capture {
    background: var(--glass-bg);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-capture:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 20px var(--accent-cyan);
}

.btn-upload,
.btn-block {
    background: linear-gradient(45deg, var(--accent-violet), var(--accent-magenta));
}

.btn-upload:hover,
.btn-block:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 30px rgba(255, 0, 80, 0.4);
    transform: scale(1.05);
}

.auth-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.5rem;
    color: #fff;
    /* Reverted to white */
}

.auth-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Results Area */
/* Results Area - Professional Redesign */
.result-container {
    display: none;
    background: linear-gradient(145deg, #0a051e, #0f0c29);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    margin-top: 3rem;
    width: 100%;
    max-width: 480px;
    /* Reduced to compact size */
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.close-result-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.close-result-btn:hover {
    background: rgba(255, 0, 80, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

[dir="rtl"] .close-result-btn {
    right: auto;
    left: 20px;
}

.result-header {
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.08), rgba(112, 0, 255, 0.05));
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.result-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 242, 234, 0.5));
}

.result-title-wrapper {
    flex: 1;
}

.result-header h2 {
    font-size: 1.3rem;
    margin: 0;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analysis-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
    opacity: 0.7;
}

.sentiment-grid {
    padding: 0.8rem 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.sentiment-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sentiment-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.12);
}

/* Card specific styling */
.bullish-card {
    border-left: 3px solid var(--success);
}

.bearish-card {
    border-left: 3px solid var(--danger);
}

.sideways-card {
    border-left: 3px solid var(--warning);
}

[dir="rtl"] .bullish-card,
[dir="rtl"] .bearish-card,
[dir="rtl"] .sideways-card {
    border-left: none;
    border-right: 3px solid;
}

[dir="rtl"] .bullish-card {
    border-right-color: var(--success);
}

[dir="rtl"] .bearish-card {
    border-right-color: var(--danger);
}

[dir="rtl"] .sideways-card {
    border-right-color: var(--warning);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 100px;
    flex-shrink: 0;
}

.trend-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

.trend-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
}

.trend-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 15px currentColor;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

/* Improved Progress Bars */
.progress-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* Color Coding */
.bullish-card .trend-value {
    color: var(--success);
}

.bearish-card .trend-value {
    color: var(--danger);
}

.sideways-card .trend-value {
    color: var(--warning);
}

.bullish-fill {
    background: linear-gradient(90deg, #00ff9d, #00cc7d);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.6);
}

.bearish-fill {
    background: linear-gradient(90deg, #ff0055, #ff3377);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.6);
}

.sideways-fill {
    background: linear-gradient(90deg, #ffbe00, #ffdd55);
    box-shadow: 0 0 25px rgba(255, 190, 0, 0.6);
}

.prediction-box {
    margin: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.08), rgba(112, 0, 255, 0.05));
    border: 1px solid rgba(0, 242, 234, 0.2);
    border-radius: 10px;
    padding: 0.7rem;
    text-align: center;
}

.pred-title {
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.pred-text {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.disclaimer-box {
    margin: 0 1rem 0.5rem;
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 190, 0, 0.08);
    border: 1px dashed rgba(255, 190, 0, 0.25);
    border-radius: 6px;
    align-items: center;
}

.warning-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.disclaimer-content {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.disclaimer-content strong {
    color: var(--warning);
    display: inline;
    margin-right: 0.3rem;
}

.result-actions {
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.4rem;
}

/* Text-only equal buttons */
.action-btn-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
}

.action-btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 234, 0.15);
}

.watermark-text {
    display: none;
    text-align: center;
    font-size: 1rem;
    color: #fff;
    padding: 1.5rem 1rem;
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.2), rgba(112, 0, 255, 0.2));
    border-top: 2px solid rgba(0, 242, 234, 0.3);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Capturing State - For sharing */
.result-container.capturing {
    max-width: none !important;
    width: auto !important;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    margin: 0;
    overflow: visible;
}

.result-container.capturing .watermark-text {
    display: block;
}

@media (max-width: 480px) {

    .result-header,
    .sentiment-grid,
    .prediction-box,
    .disclaimer-box,
    .result-actions {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .sentiment-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .sentiment-card {
        padding: 0.6rem 0.8rem;
    }

    .trend-value {
        font-size: 1.4rem;
    }

    .result-container {
        border-radius: 16px;
    }

    .result-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    .action-btn-text {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Inputs */
.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 1rem;
    border-radius: 12px;
    width: 100%;
    font-family: inherit;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-violet);
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.2);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Large Tablets (max-width: 992px) */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .step-card {
        width: 220px;
        padding: 1.5rem;
    }

    .pricing-container {
        gap: 1.5rem;
    }

    .pricing-card {
        width: 320px;
    }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* Header & Navigation */
    header {
        padding: 0.8rem 0;
    }

    nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 32px;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .lang-switcher {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .nav-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .auth-link {
        font-size: 0.85rem;
    }

    /* Hero Section */
    .hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    /* Steps */
    .steps-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .step-card {
        width: 100%;
        max-width: 350px;
        padding: 1.5rem;
    }

    .step-arrow {
        transform: rotate(90deg);
        width: 40px;
        height: 40px;
    }

    [dir="rtl"] .step-arrow {
        transform: rotate(90deg);
    }

    /* Upload Box */
    .upload-box,
    .auth-card {
        padding: 1.5rem;
        border-radius: 20px;
        margin: 0 0.5rem;
    }

    .upload-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }

    .action-btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }

    /* User Menu */
    .user-name {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        width: 180px;
    }

    /* Pricing */
    .pricing-container {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-10px);
    }

    .pricing-header {
        padding-top: 7rem;
    }

    .pricing-header h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    /* Results */
    .result-container {
        max-width: 100%;
        margin: 2rem 0;
        border-radius: 16px;
    }

    .result-header {
        padding: 1rem;
    }

    .result-body {
        padding: 1rem;
    }

    /* Contact/Support Page */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.8rem;
    }

    /* Header */
    header {
        padding: 0.6rem 0;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-img {
        height: 28px;
    }

    .lang-switcher {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .nav-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Hero */
    .hero {
        padding: 6.5rem 0 2rem;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.9rem;
    }

    /* Cards */
    .step-card {
        padding: 1.2rem;
    }

    .step-card h4 {
        font-size: 1rem;
    }

    .step-card p {
        font-size: 0.85rem !important;
    }

    /* Upload Box */
    .upload-box,
    .auth-card {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .btn-upload,
    .btn-block,
    .action-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Pricing */
    .pricing-header {
        padding-top: 6.5rem;
    }

    .pricing-header h1 {
        font-size: 1.5rem;
    }

    .pricing-header p {
        font-size: 0.9rem;
    }

    .pricing-card {
        padding: 1.5rem 1.2rem;
    }

    .plan-name {
        font-size: 1.2rem;
    }

    .price-tag {
        font-size: 2.5rem;
    }

    /* Auth Cards */
    .auth-card .form-header h2 {
        font-size: 1.3rem;
    }

    .input-group input {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    /* Results */
    .result-container {
        margin: 1rem 0;
    }

    .close-result-btn {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
        font-size: 1.2rem;
    }

    [dir="rtl"] .close-result-btn {
        right: auto;
        left: 10px;
    }

    /* History */
    .history-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

[dir="rtl"] .val {
    text-align: left;
}

[dir="rtl"] .label {
    text-align: right;
}

[dir="rtl"] .recommendation {
    border-left: none;
    border-right: 4px solid var(--accent-cyan);
    border-radius: 16px 0 0 16px;
}

/* Support Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: 0.3s;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
}

.contact-form-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 5, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
    background: rgba(10, 5, 30, 0.8);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 242, 234, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 242, 234, 0.4);
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
}

.alert-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
}

.alert-error {
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid #ff0055;
    color: #ff0055;
}

/* Settings Page Styles */
.settings-container {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.settings-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-danger {
    background: rgba(255, 0, 85, 0.2);
    color: #ff0055;
    border: 1px solid #ff0055;
}

.btn-danger:hover {
    background: rgba(255, 0, 85, 0.4);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.2);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* OTP Input Styling */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 2rem 0;
    direction: ltr;
    /* Ensure inputs flow LTR even in AR mode */
}

.otp-input {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.otp-input:focus,
.otp-input.filled {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 234, 0.05);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.2);
    transform: translateY(-2px);
}

/* Mobile Responsiveness for OTP */
@media (max-width: 480px) {
    .otp-container {
        gap: 8px;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
}

/* ============================================
   HISTORY PAGE STYLES
   ============================================ */

.history-page {
    padding-top: 100px;
    min-height: 100vh;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header-text h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #b4b4b4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.history-header-text p {
    color: var(--text-muted);
    font-size: 1rem;
}

.clear-all-btn {
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid rgba(255, 0, 85, 0.3);
    color: var(--danger);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.clear-all-btn:hover {
    background: rgba(255, 0, 85, 0.2);
    border-color: var(--danger);
    transform: translateY(-2px);
}

/* History Grid */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* History Filters */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn,
.sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-btn:hover,
.sort-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    color: #fff;
}

.filter-btn.active,
.sort-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .history-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    min-width: 80px;
    text-align: center;
    background: var(--glass-bg);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.history-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.1);
}

.history-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.history-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-card:hover .history-thumbnail img {
    transform: scale(1.05);
}

.history-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-card:hover .history-overlay {
    opacity: 1;
}

.history-delete-btn {
    background: rgba(255, 0, 85, 0.9);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-delete-btn:hover {
    transform: scale(1.1);
    background: var(--danger);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.5);
}

.history-card-info {
    padding: 1rem;
}

.history-trend-bars {
    display: flex;
    gap: 4px;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.8rem;
}

.mini-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mini-bar.bullish {
    background: linear-gradient(90deg, #00ff88, #00cc6a);
}

.mini-bar.bearish {
    background: linear-gradient(90deg, #ff4466, #cc0033);
}

.mini-bar.sideways {
    background: linear-gradient(90deg, #ffaa00, #cc8800);
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.history-dominant {
    font-size: 1.2rem;
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.history-empty h3 {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Alert Card Styles */
.history-card.alert-card {
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(0, 242, 234, 0.15);
    position: relative;
}

.history-card.alert-card:hover {
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.25);
}

.alert-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(0, 242, 234, 0.4);
}

[dir="rtl"] .alert-badge {
    right: auto;
    left: 10px;
}

.alert-symbol {
    background: rgba(0, 242, 234, 0.1);
    color: var(--accent-cyan);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 242, 234, 0.3);
}

/* Analysis Details Modal */
.analysis-modal-content {
    background: linear-gradient(145deg, #0a051e, #0f0c29);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 0, 85, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

[dir="rtl"] .modal-close-btn {
    right: auto;
    left: 15px;
}

.analysis-modal-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.analysis-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.analysis-modal-body {
    padding: 1.5rem;
}

.alert-info-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.alert-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    margin-bottom: 10px;
}

.alert-symbol-large {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analysis-bars-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.analysis-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    min-width: 60px;
    font-weight: 600;
    font-size: 0.9rem;
}

.bullish-item .bar-label {
    color: var(--success);
}

.bearish-item .bar-label {
    color: var(--danger);
}

.sideways-item .bar-label {
    color: var(--warning);
}

.bar-container {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.bar-fill.bullish-fill {
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.bar-fill.bearish-fill {
    background: linear-gradient(90deg, #ff4466, #cc0033);
    box-shadow: 0 0 10px rgba(255, 68, 102, 0.5);
}

.bar-fill.sideways-fill {
    background: linear-gradient(90deg, #ffaa00, #cc8800);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

.bar-value {
    min-width: 50px;
    text-align: right;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.recommendation-section {
    background: rgba(255, 190, 0, 0.1);
    border: 1px solid rgba(255, 190, 0, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.rec-icon {
    font-size: 1.2rem;
}

.rec-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-date {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .analysis-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .analysis-modal-image {
        max-height: 200px;
    }

    .analysis-modal-body {
        padding: 1rem;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, #0f0c29, #1a1530);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #fff;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.modal-btn.danger {
    background: linear-gradient(135deg, var(--danger), #cc0033);
    color: #fff;
}

.modal-btn.danger:hover {
    box-shadow: 0 5px 20px rgba(255, 0, 85, 0.4);
    transform: translateY(-2px);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 5, 30, 0.95);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: var(--success);
    box-shadow: 0 5px 20px rgba(0, 255, 157, 0.2);
}

.toast.error {
    border-color: var(--danger);
    box-shadow: 0 5px 20px rgba(255, 0, 85, 0.2);
}

/* History Page Responsive */
@media (max-width: 768px) {
    .history-header {
        flex-direction: column;
        text-align: center;
    }

    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .clear-all-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Image Section */
.hero-image-container {
    width: 100%;
    max-width: 900px;
    margin: 3rem auto 2rem;
    perspective: 1000px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(0, 242, 234, 0.15),
        0 0 80px rgba(112, 0, 255, 0.1);
    transition: transform 0.4s ease;
}

.hero-image:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Responsive Hero Image */
@media (max-width: 768px) {
    .hero-image-container {
        max-width: 100%;
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-image {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }

    .hero-image {
        border-radius: 8px;
        box-shadow:
            0 15px 30px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(0, 242, 234, 0.1);
    }
}

/* Chart Preview Section in Results */
.chart-preview-section {
    margin: 0.8rem 1rem;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--accent-cyan);
    box-shadow:
        0 0 20px rgba(0, 242, 234, 0.3),
        inset 0 0 20px rgba(0, 242, 234, 0.1);
}

.chart-preview-container {
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.chart-preview-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .chart-preview-section {
        margin: 0.5rem 0.75rem;
        border-radius: 12px;
    }

    .chart-preview-image {
        height: 150px;
    }
}

/* Hide chart preview during capture for cleaner download */
.capturing .chart-preview-section {
    display: block !important;
}