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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #00d9ff;
    --warning: #ffd700;
    --danger: #ff006e;
    --dark: #0a0e27;
    --light: #f8f9fa;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --dark-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
}

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    direction: rtl;
}

body.en {
    direction: ltr;
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.preloader.hide {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 100px;
    height: 100px;
    background: var(--gradient);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.preloader-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.loading-dots {
    display: inline-flex;
    gap: 0.3rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDot {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* AI Background Animation */
.ai-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.ai-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
}

.neuron {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

.connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform-origin: left center;
    animation: dataFlow 3s linear infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}

@keyframes dataFlow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Main Container */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* User Profile Menu */
.user-profile-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1rem;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

body.en .user-dropdown {
    right: auto;
    left: 0;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
}

.lang-btn {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lang-btn.active {
    background: var(--gradient);
    color: white;
}

/* AI Mode Toggle */
.ai-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-mode-toggle.active {
    background: var(--gradient);
    border-color: var(--primary);
}

.ai-indicator {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: blink 1s infinite;
}

.ai-mode-toggle.active .ai-indicator {
    background: var(--success);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Firebase Status Indicator */
.firebase-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: blink 1s infinite;
}

.firebase-status.connected .status-indicator {
    background: var(--success);
    animation: none;
}

.firebase-status.disconnected .status-indicator {
    background: var(--danger);
    animation: blink 2s infinite;
}

.firebase-status.syncing .status-indicator {
    background: var(--primary);
    animation: pulse 1s infinite;
}

/* Advanced Progress Bar */
.progress-container {
    position: fixed;
    top: 85px;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.progress-container.active {
    opacity: 1;
    transform: translateY(0);
}

.progress-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s infinite;
}

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

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.step-circle.active {
    background: var(--gradient);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.step-circle.completed {
    background: var(--success);
    border-color: var(--success);
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 80px;
}

.step-circle.active + .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding-top: 100px;
}

.section {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate 20s linear infinite;
}

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

/* Typography */
.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* AI Analysis Display */
.ai-analysis {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ai-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ai-processing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.processing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: processingPulse 1.5s ease-in-out infinite;
}

.processing-dot:nth-child(2) { animation-delay: 0.2s; }
.processing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes processingPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Smart Buttons */
.btn-ai {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.btn-ai:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn-ai:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* Question Cards */
.options-container {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.option-card {
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    transition: left 0.5s;
}

.option-card:hover::before {
    left: 100%;
}

.option-card:hover {
    transform: translateX(-10px);
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

body.en .option-card:hover {
    transform: translateX(10px);
}

.option-card.selected {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
    transform: translateX(-10px) scale(1.02);
}

body.en .option-card.selected {
    transform: translateX(10px) scale(1.02);
}

.option-card.selected .fas.fa-check-circle {
    color: var(--success) !important;
}

/* AI Insights Panel */
.ai-insights {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.ai-insights.active {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

body.en .ai-insights {
    right: auto;
    left: 2rem;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    animation: slideIn 0.5s ease-out;
}

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

/* Results Dashboard - Enhanced */
.results-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.metric-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    animation: cardShine 3s infinite;
}

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

.metric-value {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
    animation: numberCount 2s ease-out;
}

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

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

/* Chart Container */
.chart-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

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

.chart-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.chart-btn {
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.chart-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
}

/* Enhanced AI Score Visualization */
.ai-score-ring {
    width: 250px;
    height: 250px;
    margin: 2rem auto;
    position: relative;
}

.score-ring-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 20px solid rgba(102, 126, 234, 0.1);
    position: absolute;
}

.score-ring-fill {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 20px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    position: absolute;
    animation: fillRing 2s ease-out forwards;
    filter: drop-shadow(0 0 10px var(--primary));
}

@keyframes fillRing {
    0% { transform: rotate(-90deg); }
    100% { transform: rotate(calc(var(--score) * 3.6deg - 90deg)); }
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.score-label {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Enhanced Results Section */
.results-hero {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.results-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.results-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.results-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

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

/* Advanced Final Results Display */
.final-results-container {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    animation: resultsSlideIn 1s ease-out;
}

@keyframes resultsSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.final-results-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.03;
    animation: rotate 30s linear infinite;
}

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

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

.score-circle {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg, var(--primary) var(--score-angle, 0deg), rgba(102, 126, 234, 0.1) var(--score-angle, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: scoreReveal 2s ease-out;
}

@keyframes scoreReveal {
    from { --score-angle: 0deg; }
    to { --score-angle: calc(var(--score) * 3.6deg); }
}

.score-inner {
    width: 80%;
    height: 80%;
    background: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.score-number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.score-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-summary {
    flex: 1;
    min-width: 250px;
}

.summary-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.summary-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.summary-tag {
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: tagSlideIn 0.5s ease-out;
}

.summary-tag.sector {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.summary-tag.risk {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.summary-tag.timeline {
    background: rgba(240, 147, 251, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

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

/* Recommendation Card Enhanced */
.final-recommendation-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    animation: recommendationSlideIn 1.2s ease-out;
}

@keyframes recommendationSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.final-recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    animation: cardShimmer 3s infinite;
}

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

.recommendation-header-enhanced {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.recommendation-icon-large {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.recommendation-icon-large::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: iconShine 4s infinite;
}

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

.recommendation-content-enhanced {
    flex: 1;
}

.recommendation-title-large {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.recommendation-description-enhanced {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Enhanced IPO Card Design */
.ipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.ipo-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: ipoCardSlideIn 0.8s ease-out;
}

@keyframes ipoCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ipo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.25);
    border-color: var(--primary);
}

.ipo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.ipo-card:hover::before {
    left: 100%;
}

.ipo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.ipo-company-info {
    flex: 1;
}

.ipo-company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ipo-sector-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ipo-match-score {
    background: var(--gradient);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    text-align: center;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.ipo-match-score::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: matchScoreShine 3s infinite;
}

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

.match-percentage {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.match-label {
    font-size: 0.7rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ipo-card-body {
    margin-bottom: 2rem;
}

.ipo-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.ipo-risk-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.risk-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.risk-icon.low {
    background: rgba(0, 217, 255, 0.1);
    color: var(--success);
}

.risk-icon.medium {
    background: rgba(255, 215, 0, 0.1);
    color: var(--warning);
}

.risk-icon.high {
    background: rgba(255, 0, 110, 0.1);
    color: var(--danger);
}

.risk-content {
    flex: 1;
}

.risk-level {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.risk-level.low { color: var(--success); }
.risk-level.medium { color: var(--warning); }
.risk-level.high { color: var(--danger); }

.risk-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ipo-features-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ipo-card-footer {
    display: flex;
    gap: 1rem;
}

.btn-ipo-details {
    flex: 1;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-ipo-details:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ipo-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-ipo-bookmark {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.btn-ipo-bookmark:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Portfolio Section */
.portfolio-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    margin: 2rem 0;
}

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

.portfolio-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portfolio-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--success);
}

.portfolio-chart {
    height: 300px;
    margin: 2rem 0;
    position: relative;
}

.asset-allocation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.allocation-item {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

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

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

/* Transaction History */
.transaction-history {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-5px);
}

body.en .transaction-item:hover {
    transform: translateX(5px);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.transaction-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.transaction-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 1.2rem;
    font-weight: 700;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.payment-modal.active {
    opacity: 1;
    visibility: visible;
}

.payment-content {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    animation: modalSlideIn 0.5s ease-out;
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

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

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

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.payment-method i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Action Buttons Enhanced */
.action-buttons-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 3rem 0 2rem;
    flex-wrap: wrap;
}

.btn-action-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: actionButtonFloat 3s ease-in-out infinite;
}

@keyframes actionButtonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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

.btn-action-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-action-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

/* Final Recommendation Card */
.final-recommendation {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 3rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    animation: scaleIn 1s ease-out;
}

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

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.recommendation-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: rotateIcon 3s ease-in-out infinite;
}

@keyframes rotateIcon {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.recommendation-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.recommendation-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Risk Level Indicator */
.risk-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    border-left: 5px solid var(--primary);
}

body.en .risk-indicator {
    border-left: none;
    border-right: 5px solid var(--primary);
}

.risk-level {
    font-size: 1.5rem;
    font-weight: 700;
}

.risk-low { color: var(--success); }
.risk-medium { color: var(--warning); }
.risk-high { color: var(--danger); }

/* Enhanced Recommendations */
.recommendation-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInRight 0.8s ease-out;
}

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

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.ai-match-score {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

body.en .ai-match-score {
    right: auto;
    left: 1rem;
}

/* Navigation Button Improvements */
.btn-nav-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-ipo-secondary {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-ipo-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* AI Chat Assistant */
.ai-chat {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    height: 600px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

body.en .ai-chat {
    right: auto;
    left: 2rem;
}

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

.chat-header {
    background: var(--gradient);
    padding: 1.5rem;
    border-radius: 25px 25px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.message {
    margin-bottom: 1rem;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.message-content {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 15px;
    max-width: 80%;
}

.message.user .message-content {
    background: var(--gradient);
    color: white;
    margin-left: auto;
}

body.en .message.user .message-content {
    margin-left: 0;
    margin-right: auto;
}

/* Chat Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    z-index: 999;
}

body.en .chat-toggle {
    right: auto;
    left: 2rem;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle.active {
    background: linear-gradient(135deg, #ff006e 0%, #ff3d71 100%);
}

/* نافذة تسجيل الدخول المحسنة */
#loginModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-content {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    animation: modalSlideIn 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.login-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-btn {
    flex: 1;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.google-btn {
    background: white;
    color: #333;
}

.google-btn:hover {
    background: #f5f5f5;
}

/* لوحة الإحصائيات المحسنة */
#statsWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
    min-width: 300px;
    z-index: 1000;
    display: none;
    animation: slideIn 0.5s ease-out;
}

body.en #statsWidget {
    right: auto;
    left: 20px;
}

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

.stats-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

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

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Notification System */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: notificationSlide 0.5s ease-out;
}

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.notification.success {
    background: var(--success);
}

.notification.warning {
    background: var(--warning);
    color: var(--dark);
}

.notification.danger {
    background: var(--danger);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 25%, rgba(102, 126, 234, 0.2) 50%, rgba(102, 126, 234, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Success Animations */
.success-animation {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Modal Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from { transform: translate(-50%, -100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Responsive Enhancements - MOBILE FIRST */
@media (max-width: 768px) {
    /* Header Mobile */
    .header {
        padding: 1rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .lang-switcher {
        order: 1;
    }

    .ai-mode-toggle {
        order: 2;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .firebase-status {
        order: 3;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }

    .user-profile-menu {
        order: 4;
    }

    /* Progress Bar Mobile */
    .progress-container {
        top: 80px;
        padding: 0.5rem 1rem;
    }

    .progress-steps {
        gap: 0.2rem;
    }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 50px;
    }

    /* Main Content Mobile */
    .main-content {
        padding-top: 130px;
    }

    .section {
        padding: 1rem;
        min-height: calc(100vh - 130px);
    }

    .glass-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Buttons Mobile */
    .btn-ai {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .btn-nav-container {
        gap: 0.5rem;
    }

    /* Options Mobile */
    .option-card {
        padding: 1rem;
    }

    /* Results Mobile */
    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .score-display {
        justify-content: center;
    }

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

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

    .final-results-container {
        padding: 1.5rem;
    }

    .results-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-card {
        padding: 1.5rem;
    }

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

    /* IPO Cards Mobile */
    .ipo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ipo-card {
        padding: 1.5rem;
    }

    .ipo-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .ipo-match-score {
        align-self: flex-end;
    }

    /* Action Buttons Mobile */
    .action-buttons-container {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-action-primary {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        justify-content: center;
    }

    .btn-ipo-secondary {
        width: 100%;
        justify-content: center;
    }

    /* AI Score Ring Mobile */
    .ai-score-ring {
        width: 200px;
        height: 200px;
    }

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

    /* Summary Tags Mobile */
    .summary-tags {
        justify-content: center;
    }

    /* AI Insights Mobile - Hide on small screens */
    .ai-insights {
        display: none;
    }

    /* AI Chat Mobile */
    .ai-chat {
        width: calc(100vw - 2rem);
        height: calc(100vh - 8rem);
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-width: 400px;
        margin: 0 auto;
    }

    body.en .ai-chat {
        right: 1rem;
        left: 1rem;
    }

    .chat-toggle {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
        bottom: 1rem;
        right: 1rem;
    }

    body.en .chat-toggle {
        right: 1rem;
        left: auto;
    }

    /* Chart Controls Mobile */
    .chart-header {
        flex-direction: column;
        gap: 1rem;
    }

    .chart-controls {
        width: 100%;
        justify-content: center;
    }

    /* Portfolio Mobile */
    .portfolio-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

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

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

    /* Transaction Mobile */
    .transaction-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .transaction-info {
        flex-direction: column;
    }

    /* Modal Mobile */
    .payment-content {
        padding: 2rem;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    /* Stats Widget Mobile */
    #statsWidget {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-width: 400px;
        margin: 0 auto;
    }

    body.en #statsWidget {
        right: 1rem;
        left: 1rem;
    }

    /* Login Modal Mobile */
    .login-content {
        padding: 2rem;
    }

    /* Recommendation Cards Mobile */
    .recommendation-header-enhanced {
        flex-direction: column;
        text-align: center;
    }

    .recommendation-icon-large {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .recommendation-title-large {
        font-size: 1.5rem;
    }

    .recommendation-description-enhanced {
        font-size: 1rem;
    }

    /* User Dropdown Mobile */
    .user-dropdown {
        right: -20px;
        left: auto;
        min-width: 200px;
    }

    body.en .user-dropdown {
        left: -20px;
        right: auto;
    }

    /* Dashboard Mobile */
    .dashboard-container {
        padding: 1rem;
    }

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

    .system-status {
        gap: 1rem;
    }

    .status-card {
        padding: 1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .holographic-card {
        padding: 1.5rem;
        min-height: auto;
    }

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

    .live-analysis {
        padding: 2rem;
    }

    .analysis-header {
        flex-direction: column;
        text-align: center;
    }

    .live-alerts {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
    }

    body.en .live-alerts {
        right: 1rem;
        left: 1rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .progress-steps {
        display: none;
    }

    .btn-ai {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .ai-mode-toggle span {
        display: none;
    }

    .firebase-status span {
        display: none;
    }
}

/* ===== IPO DETAILS SECTION ===== */
.ipo-details-card {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 0;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
    position: relative;
}

.ipo-details-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: cardShine 3s infinite;
}

.ipo-details-header {
    background: var(--gradient);
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.ipo-details-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    animation: rotate 20s linear infinite;
}

.company-logo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 2;
}

.company-logo {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.company-basic-info {
    color: white;
}

.company-basic-info h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.company-basic-info p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.sector-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
}

.ipo-key-metrics {
    display: flex;
    gap: 2rem;
    z-index: 2;
}

.key-metric {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 120px;
    transition: all 0.3s ease;
}

.key-metric:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
}

.key-metric .metric-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.key-metric .metric-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
}

.match-score-large {
    background: rgba(0, 217, 255, 0.2) !important;
    border-color: var(--success) !important;
}

.match-score-large .metric-value {
    color: var(--success) !important;
}

/* Investment Calculator */
.investment-calculator {
    padding: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.investment-calculator h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: 1.2rem 4rem 1.2rem 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.input-group .currency {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-10%);
    color: var(--text-secondary);
    font-weight: 600;
}

.calculation-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calc-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.calc-result:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-5px);
}

.calc-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.calc-value.success {
    color: var(--success);
}

.calc-value.primary {
    color: var(--primary);
}

/* Company Description */
.company-description {
    padding: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.company-description h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.company-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Features Showcase */
.features-showcase {
    padding: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.features-showcase h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.feature-item {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    background: rgba(102, 126, 234, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
    animation: iconBounce 2s ease-in-out infinite;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Risk & Financial Section */
.risk-financial-section {
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.risk-assessment h4, .financial-highlights h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.risk-indicator-detailed {
    background: rgba(102, 126, 234, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.risk-level-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.risk-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 2s ease-out;
    animation: riskFillAnimation 2s ease-out;
}

@keyframes riskFillAnimation {
    0% { width: 0%; }
    100% { width: var(--risk-percentage, 50%); }
}

.risk-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.risk-level-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.risk-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.financial-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.financial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.financial-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-5px);
}

.financial-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.financial-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* IPO Timeline */
.ipo-timeline {
    padding: 3rem;
    border-bottom: 1px solid var(--glass-border);
}

.ipo-timeline h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1;
}

.timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--glass);
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-icon {
    background: var(--gradient);
    border-color: var(--primary);
    transform: scale(1.1);
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    50% { box-shadow: 0 0 20px 10px rgba(102, 126, 234, 0); }
}

.timeline-content h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Action Buttons */
.ipo-details-actions {
    padding: 3rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-invest-now {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: investButtonGlow 3s ease-in-out infinite;
}

@keyframes investButtonGlow {
    0%, 100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6); }
}

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

.btn-invest-now:hover::before {
    width: 400px;
    height: 400px;
}

.btn-invest-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-secondary-action {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary-action:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Mobile Responsive for IPO Details */
@media (max-width: 768px) {
    .ipo-details-header {
        padding: 2rem;
        flex-direction: column;
        text-align: center;
    }

    .company-logo-section {
        flex-direction: column;
        text-align: center;
    }

    .company-basic-info h2 {
        font-size: 1.8rem;
    }

    .ipo-key-metrics {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .risk-financial-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .timeline-container {
        flex-direction: column;
        gap: 2rem;
    }

    .timeline-container::before {
        display: none;
    }

    .ipo-details-actions {
        flex-direction: column;
        padding: 2rem;
    }

    .btn-invest-now {
        width: 100%;
        justify-content: center;
    }
}

/* 🌌 3D Universe Styles */
#universe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, #0a0e27 0%, #000000 100%);
}

#universe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 🎨 AI Dashboard Styles */
.ai-universe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, #0a0e27 0%, #000000 100%);
    overflow: hidden;
}

.grid-3d {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateZ(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateZ(100px); }
}

.ai-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: aiParticleFloat 15s infinite;
}

@keyframes aiParticleFloat {
    0% {
        opacity: 0;
        transform: translate(0, 100vh) scale(0);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(100vw * var(--x)), -100vh) scale(0);
    }
}

.dashboard-container {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.dashboard-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #00d9ff, #667eea);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographicText 3s linear infinite;
    margin-bottom: 1rem;
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

.dashboard-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.system-status {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.status-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    animation: statusSweep 3s infinite;
}

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

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.status-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.status-info h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.status-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.market-indicator {
    text-align: center;
    margin-bottom: 2rem;
}

.market-value {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

.market-value::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    animation: widthPulse 2s ease-in-out infinite;
}

@keyframes widthPulse {
    0%, 100% { transform: scaleX(0.8); }
    50% { transform: scaleX(1); }
}

.market-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--success);
    border-radius: 20px;
    color: var(--success);
    font-weight: 600;
}

.ai-recommendations {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(240, 147, 251, 0.05));
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.recommendation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--glass);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recommendation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s;
}

.recommendation-item:hover::before {
    left: 100%;
}

.recommendation-item:hover {
    transform: translateX(-10px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

body.en .recommendation-item:hover {
    transform: translateX(10px);
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stock-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.stock-code {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.recommendation-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

body.en .recommendation-action {
    align-items: flex-start;
}

.action-badge {
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.action-badge.buy {
    background: rgba(0, 217, 255, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.action-badge.hold {
    background: rgba(255, 215, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.confidence-score {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.portfolio-performance {
    position: relative;
    text-align: center;
}

.performance-ring {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
}

.ring-background {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 15px solid rgba(102, 126, 234, 0.1);
    position: absolute;
}

.ring-progress {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 15px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    position: absolute;
    animation: ringRotate 2s ease-out forwards;
    filter: drop-shadow(0 0 20px var(--primary));
}

@keyframes ringRotate {
    0% { transform: rotate(-90deg); }
    100% { transform: rotate(calc(var(--performance) * 3.6deg - 90deg)); }
}

.performance-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--success);
}

.performance-label {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.live-analysis {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 25px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.ai-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.ai-avatar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0; }
}

.analysis-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analysis-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.insight-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    transition: all 0.5s;
    transform: translate(-50%, -50%);
}

.insight-card:hover::before {
    width: 300px;
    height: 300px;
}

.insight-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.insight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.insight-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

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

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.live-alerts {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 350px;
    z-index: 1000;
}

body.en .live-alerts {
    right: auto;
    left: 2rem;
}

.alert-item {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.alert-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.alert-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.glow-text {
    text-shadow: 
        0 0 10px rgba(102, 126, 234, 0.8),
        0 0 20px rgba(102, 126, 234, 0.6),
        0 0 30px rgba(102, 126, 234, 0.4);
}

.neon-border {
    box-shadow: 
        inset 0 0 20px rgba(102, 126, 234, 0.2),
        0 0 20px rgba(102, 126, 234, 0.2),
        0 0 40px rgba(102, 126, 234, 0.1);
}

.performance-indicators {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.indicator {
    text-align: center;
}

.indicator-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.3rem;
}

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

.loading-wave {
    display: inline-flex;
    gap: 0.2rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingWave 1.5s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.1s; }
.loading-dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes loadingWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 🔮 Holographic UI Elements */
.holographic {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 25%, 
        rgba(240, 147, 251, 0.1) 50%, 
        rgba(0, 217, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    border-image: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #00d9ff 100%
    ) 1;
    overflow: hidden;
}

.holographic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: holographicShine 3s infinite;
}

.holographic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    pointer-events: none;
}

@keyframes holographicShine {
    0% { transform: translate(-100%, -100%) rotate(0deg); }
    100% { transform: translate(100%, 100%) rotate(90deg); }
}

.holographic-glow {
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(118, 75, 162, 0.3),
        0 0 60px rgba(240, 147, 251, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Holographic Card */
.holographic-card {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 25%, 
        rgba(240, 147, 251, 0.1) 50%, 
        rgba(0, 217, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid transparent;
    border-image: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #00d9ff) 1;
    border-radius: 25px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 400px;
}

.holographic-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%);
    animation: holographicShine 4s infinite;
}

.holographic-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 0 30px rgba(102, 126, 234, 0.5),