/* ===== CSS Variables ===== */
:root {
    --primary: #00f0ff;
    --primary-dark: #0099aa;
    --secondary: #7b2cff;
    --accent: #ff00aa;
    --success: #00ff88;
    --warning: #ffaa00;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(15, 15, 35, 0.85);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-glow: rgba(0, 240, 255, 0.3);
    --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.3);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== App Container ===== */
.app-container {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* ===== Background Layer ===== */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(123, 44, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 240, 255, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 80%, rgba(255, 0, 170, 0.15) 0%, transparent 40%),
        url('../images/1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/2.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    animation: bgPulse 6s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(30px); }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 8s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.6; }
    50% { transform: translateY(-100px) translateX(20px); opacity: 0.2; }
}

.bg-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Main Content ===== */
.main-content {
    position: relative;
    z-index: 1;
    padding: 30px 20px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Logo Section ===== */
.logo-section {
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.8)); }
}

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    margin-bottom: 35px;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
}

.title-glow {
    display: block;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    font-weight: 500;
}

.description {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 340px;
    margin: 0 auto;
}

/* ===== Input Section ===== */
.input-section {
    width: 100%;
    max-width: 360px;
    margin-bottom: 40px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.stock-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.stock-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    text-transform: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
}

.stock-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
}

.input-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: width 0.3s ease;
}

.stock-input:focus ~ .input-glow {
    width: 80%;
}

/* ===== Analyze Button ===== */
.analyze-btn {
    width: 100%;
    padding: 18px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.4);
}

.analyze-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btnShine 3s infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ===== Participants Counter ===== */
.participants-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-secondary);
}

.participants-counter i {
    color: var(--primary);
}

.participants-counter strong {
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== Features Section ===== */
.features-section {
    width: 100%;
    max-width: 360px;
    margin-bottom: 30px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title i {
    color: var(--warning);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(123, 44, 255, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 22px;
    color: var(--primary);
}

.feature-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===== Bottom CTA ===== */
.bottom-cta {
    width: 100%;
    max-width: 360px;
}

.cta-btn {
    width: 100%;
    padding: 16px 30px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.wa-icon {
    width: 24px;
    height: 24px;
}

/* ===== Analysis Process ===== */
.analysis-process {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.analysis-process.active {
    display: flex;
}

.process-container {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
}

.process-container {
    text-align: center;
    padding: 40px 30px;
}

/* AI Scanner Animation */
.ai-scanner {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
}

.scanner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.5;
}

.ring-1 {
    width: 150px;
    height: 150px;
    animation: ringPulse 2s infinite ease-out;
}

.ring-2 {
    width: 110px;
    height: 110px;
    animation: ringPulse 2s infinite ease-out 0.3s;
    border-color: var(--secondary);
}

.ring-3 {
    width: 70px;
    height: 70px;
    animation: ringPulse 2s infinite ease-out 0.6s;
    border-color: var(--accent);
}

@keyframes ringPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.scanner-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: corePulse 1s infinite ease-in-out;
}

.scanner-core i {
    font-size: 28px;
    color: var(--bg-dark);
}

.scanner-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.process-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 0 0 20px var(--primary);
}

.process-stock {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.process-steps {
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
    color: var(--primary);
}

.step.complete {
    opacity: 1;
    color: var(--success);
}

.step i {
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 240, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* ===== Analysis Result ===== */
.analysis-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow-y: auto;
}

.analysis-result.active {
    display: flex;
}

.result-container {
    text-align: center;
    padding: 40px 25px;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.success-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
}

.success-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-circle i {
    font-size: 45px;
    color: var(--bg-dark);
}

.result-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.result-stock {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
}

.result-header {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 240, 255, 0.2));
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.result-content {
    padding: 20px;
}

.result-message {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.result-message i {
    color: var(--warning);
}

.result-highlights {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.result-highlights li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.result-highlights i {
    color: var(--success);
    font-size: 14px;
}

.get-report-btn {
    width: 100%;
    padding: 18px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    animation: ctaPulse 2s infinite;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
}

.get-report-btn:hover {
    transform: translateY(-2px);
}

.analyze-again-btn {
    width: 100%;
    padding: 14px 30px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.analyze-again-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 430px) {
    .app-container {
        max-width: 100%;
    }
    
    .bg-layer {
        max-width: 100%;
    }
    
    .analysis-process,
    .analysis-result {
        max-width: 100%;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: var(--bg-dark);
}
