:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --card-bg: rgba(15, 15, 15, 0.7);
    --border-glow: rgba(0, 255, 195, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #c8c8c8;
    --accent-primary: #00ffc3;
    --accent-secondary: #00d9ff;
    --accent-purple: #bf00ff;
    --accent-pink: #ff00a2;
    --shadow-glow: 0 0 30px rgba(0, 255, 195, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

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

.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

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

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-purple), transparent);
    bottom: -80px;
    left: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-pink), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-secondary), transparent);
    top: 20%;
    right: 20%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.particle {
    position: absolute;
    background: rgba(0, 255, 195, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}


.hero {
    position: relative;
    z-index: 10;
    padding: 100px 20px 80px;
    text-align: center;
    background: transparent;
    transition: none;
    margin-top: 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0, 255, 195, 0.08), transparent 70%);
    pointer-events: none;
}

.hero h1,
.hero .hero-badge,
.hero .hero-description,
.hero .hero-buttons,
.hero .warning {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #00ffc3;
    padding: 8px 18px;
    border: 1px solid rgba(0, 255, 195, 0.3);
    border-radius: 40px;
    background: rgba(0, 255, 195, 0.08);
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 30px rgba(0, 255, 195, 0.05);
}

.hero h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff, #00ffc3, #00d9ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 80px rgba(0, 255, 195, 0.15);
    letter-spacing: -1px;
}

.hero h1 em {
    font-style: italic;
    background: linear-gradient(135deg, #00ffc3, #bf00ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(0, 255, 195, 0.15);
}

.hero-description {
    max-width: 650px;
    margin: 0 auto 32px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.btn-primary {
    background: linear-gradient(135deg, #00ffc3, #00d9ff);
    border: none;
    padding: 16px 40px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 255, 195, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 195, 0.4);
}

.btn-secondary {
    background: rgba(0, 255, 195, 0.08);
    border: 1px solid rgba(0, 255, 195, 0.3);
    padding: 16px 40px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    color: #00ffc3;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(0, 255, 195, 0.18);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 255, 195, 0.15);
}

.warning {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 8px auto 0 auto;
    line-height: 1.4;
    max-width: 280px;
    position: relative;
    z-index: 2;
}



.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}


.card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 40px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.card:last-child {
    margin-bottom: 0;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 195, 0.05), transparent);
    transition: left 0.6s ease;
}

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

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 195, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 195, 0.1);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.card h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    margin-top: 8px;
    position: absolute;
    bottom: -12px;
    left: 0;
}


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

.grid .card {
    margin-bottom: 0;
}

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

.stats > div {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s;
}

.stats > div:hover {
    background: rgba(0, 255, 195, 0.08);
    border-color: rgba(0, 255, 195, 0.2);
    transform: scale(1.02);
}

.stats span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.stats strong {
    font-size: 1.6rem;
    color: var(--accent-primary);
    display: block;
    margin-top: 8px;
    font-weight: 700;
}

#stockTable {
    width: 100%;
    border-collapse: collapse;
}

#stockTable tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#stockTable td {
    padding: 14px 8px;
    font-size: 0.9rem;
}

#stockTable td:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

#stockTable td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--accent-primary);
}

input, button, .comparator-select {
    border-radius: 60px;
}

.row {
    display: flex;
    gap: 12px;
}

.row input {
    flex: 1;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.row input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 195, 0.1);
    outline: none;
}

button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 195, 0.3);
}


.chat-box {
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    margin-bottom: 20px;
}

.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    padding: 12px 20px;
    border-radius: 20px 20px 6px 20px;
    max-width: 80%;
    font-weight: 500;
}

.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 20px 20px 20px 6px;
    max-width: 80%;
}

.quick-stock-btn {
    background: rgba(0, 255, 195, 0.08) !important;
    color: var(--accent-primary) !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 255, 195, 0.25) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.quick-stock-btn:hover {
    background: rgba(0, 255, 195, 0.2) !important;
    transform: translateY(-3px) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 5px 15px rgba(0, 255, 195, 0.2) !important;
}

.timestamp {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.timestamp .refresh-time {
    font-family: monospace;
    color: var(--accent-primary);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.chat-header h2 {
    margin-bottom: 0 !important;
}

.clear-chat-btn {
    background: rgba(255, 100, 100, 0.15) !important;
    color: #ff6b6b !important;
    padding: 8px 18px !important;
    font-size: 0.8rem !important;
    border: 1px solid rgba(255, 100, 100, 0.3) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.clear-chat-btn:hover {
    background: rgba(255, 100, 100, 0.3) !important;
    transform: translateY(-2px) !important;
}


.comparator-section {
    margin-top: 20px;
}

.comparator-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.comparator-select {
    flex: 1;
    min-width: 140px;
    padding: 12px 18px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 40px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border 0.3s;
}

.comparator-select:focus {
    border-color: #00ffc3;
    outline: none;
}

.vs-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00ffc3, #00d9ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #000;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0,255,195,0.3);
}

.compare-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #bf00ff, #ff00a2);
    border: none;
    border-radius: 40px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.compare-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(191,0,255,0.3);
}

.comparator-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: stretch;
    margin-top: 25px;
}

.compare-card {
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 24px 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compare-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,255,195,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

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

.compare-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
}

.compare-symbol {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.compare-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #00ffc3;
    line-height: 1.2;
}

.compare-change {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.compare-change.up { color: #00ffc3; }
.compare-change.down { color: #ff4a4a; }

.compare-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 10px;
}

.compare-details span {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.6;
}

.compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-secondary);
    padding: 0 10px;
}

.compare-result {
    grid-column: 1 / -1;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 20px 24px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}

.compare-diff-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 14px;
}

.diff-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
}

.compare-diff-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.compare-diff-text strong {
    font-size: 1.1rem;
}


.news-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}

.news-item:hover {
    background: rgba(0, 255, 195, 0.05);
    transform: translateX(5px);
}

.news-title {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.news-title:hover {
    color: var(--accent-primary);
}

.news-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-date {
    font-size: 0.65rem;
    color: var(--accent-primary);
    display: inline-block;
}

.news-source {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-left: 12px;
}


.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
}

.ranking-item:hover {
    background: rgba(0, 255, 195, 0.1);
    transform: translateX(5px);
}

.ranking-position {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
    width: 35px;
}

.ranking-symbol {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.ranking-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}


.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 195, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

body.light-mode {
    background: radial-gradient(circle at top left, #f0f0f0 0%, #e0e0e0 100%);
}

body.light-mode .card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .card h2,
body.light-mode .stats strong,
body.light-mode .comparator-stats .value,
body.light-mode .timestamp .refresh-time {
    color: #006644;
}

body.light-mode .stats span,
body.light-mode .comparator-stats .label,
body.light-mode .hero-description,
body.light-mode .warning {
    color: #555;
}

body.light-mode input,
body.light-mode .comparator-select {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #000;
}

body.light-mode .chat-box,
body.light-mode .bot {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .quick-stock-btn {
    background: rgba(0, 100, 68, 0.1) !important;
    border-color: rgba(0, 100, 68, 0.3) !important;
    color: #006644 !important;
}

body.light-mode .news-item {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .news-title {
    color: #000;
}

body.light-mode .ranking-item {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .ranking-count {
    background: rgba(0, 0, 0, 0.1);
}


.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 255, 195, 0.2);
    border-top-color: #00ffc3;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.fade-update {
    animation: fadeUpdate 0.4s ease-out;
}

@keyframes fadeUpdate {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}


.quiz-progress {
    height: 4px;
    background: rgba(0, 255, 195, 0.2);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 24px;
}
#quizBar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 100px;
    transition: width 0.4s ease;
}
.quiz-q {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 6px;
    line-height: 1.2;
}
.quiz-count {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quiz-opt {
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
}
.quiz-opt:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 195, 0.08);
    transform: translateX(4px);
}
.quiz-opt .key {
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-primary);
}
.result-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.result-eyebrow {
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-primary);
}
.result-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    margin: 8px 0 12px;
}
.result-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.alloc-box {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.alloc-chart {
    position: relative;
    width: 150px;
    height: 150px;
    flex: none;
}
.alloc-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.alloc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.alloc-item .sw {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex: none;
}
.alloc-item b {
    font-family: monospace;
    margin-left: auto;
}


.calc-controls {
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.field > span {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}
.field > span strong {
    font-family: monospace;
    color: var(--accent-primary);
}
.money-input {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0 16px;
    transition: border 0.2s;
}
.money-input:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 195, 0.1);
}
.money-input i {
    font-style: normal;
    font-family: monospace;
    color: var(--text-secondary);
}
.money-input input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 17px;
    font-weight: 600;
    padding: 14px 10px;
}
.money-input input:focus {
    outline: none;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 4px solid var(--bg-darker);
    box-shadow: 0 0 0 1px var(--accent-primary);
    transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.calc-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.calc-headline {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.calc-headline span {
    font-size: 14px;
    color: var(--text-secondary);
}
.calc-headline strong {
    font-family: monospace;
    font-size: clamp(34px, 6vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.calc-breakdown {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.cb {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cb-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex: none;
}
.dot-contrib {
    background: var(--text-secondary);
}
.dot-interest {
    background: var(--accent-primary);
}
.cb em {
    font-family: monospace;
    font-style: normal;
    font-size: 18px;
    font-weight: 600;
    display: block;
}
.cb small {
    font-size: 12px;
    color: var(--text-secondary);
}


.sort-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
#sofipoSort button {
    padding: 6px 12px;
    background: rgba(0, 255, 195, 0.08);
    border: 1px solid rgba(0, 255, 195, 0.25);
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--accent-primary);
}
#sofipoSort button.active {
    background: var(--accent-primary);
    color: #000;
}
.sofipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.sofipo {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    transition: transform 0.25s, border 0.25s;
}
.sofipo:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}
.sofipo-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.sofipo-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #000;
    flex: none;
}
.sofipo-name {
    font-weight: 700;
    font-size: 17px;
}
.sofipo-rate {
    font-family: monospace;
    font-size: 34px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}
.sofipo-rate small {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}
.sofipo-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}
.sofipo-meta div {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}
.sofipo-meta b {
    font-family: monospace;
    color: var(--text-primary);
}


.glossary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gloss-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: border 0.2s;
}
.gloss-item:hover {
    border-color: rgba(255, 255, 255, 0.16);
}
.gloss-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 18px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.gloss-q .plus {
    font-family: monospace;
    font-size: 22px;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
    flex: none;
}
.gloss-item.open .plus {
    transform: rotate(45deg);
}
.gloss-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.gloss-a p {
    padding: 0 24px 22px;
    color: var(--text-secondary);
    font-size: 15px;
}


.hidden {
    display: none !important;
}
.muted.tiny {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.center {
    text-align: center;
}
.full {
    width: 100%;
}


.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 195, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #00ffc3, #00d9ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #000;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #00ffc3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #00ffc3;
    background: rgba(0, 255, 195, 0.1);
}

.nav-btn {
    background: linear-gradient(135deg, #00ffc3, #00d9ff);
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 195, 0.3);
}

/* ============================================================
   TICKER MEJORADO PARA PC
   ============================================================ */
.ticker-container {
    position: relative;
    z-index: 5;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(0, 255, 195, 0.3);
    border-bottom: 2px solid rgba(0, 255, 195, 0.3);
    overflow: hidden;
    margin-top: 20px;
    padding: 8px 0;
}

.ticker-track {
    display: flex;
    gap: 40px;
    padding: 4px 0;
    width: max-content;
    animation: tickerMarquee 45s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.tick {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    white-space: nowrap;
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.tick:hover {
    color: #00ffc3;
}

.tick b {
    font-weight: 700;
    color: #ffffff;
}

.tick .up {
    color: #43e08a;
}

.tick .down {
    color: #ff6b6b;
}

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


.section-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
}

.input-wrapper input:focus {
    border-color: var(--accent-primary);
    outline: none;
}

.search-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    font-weight: 600;
}

.popular-stocks {
    margin-bottom: 20px;
}

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

.stock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stock-chip {
    background: rgba(0, 255, 195, 0.08) !important;
    color: var(--accent-primary) !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 255, 195, 0.25) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.stock-chip:hover {
    background: rgba(0, 255, 195, 0.2) !important;
    transform: translateY(-2px) !important;
}

.status-msg {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}


.stock-info-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 28px;
    margin-bottom: 48px;
}

.stock-info-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px;
    transition: all 0.4s ease;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.stock-badge {
    font-size: 0.7rem;
    color: var(--accent-primary);
    background: rgba(0, 255, 195, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
}

.stock-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.refresh-btn {
    background: rgba(0, 255, 195, 0.1) !important;
    color: #00ffc3 !important;
    padding: 8px 16px !important;
    font-size: 1rem !important;
    border: 1px solid rgba(0, 255, 195, 0.3) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    width: auto !important;
}

.stock-price-section {
    margin-bottom: 24px;
}

.stock-price {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stock-change {
    font-size: 1.1rem;
    margin-left: 12px;
    font-weight: 500;
}

.stock-change.up {
    color: #00ffc3;
}

.stock-change.down {
    color: #ff4a4a;
}

.stock-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.chart-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px;
    transition: all 0.4s ease;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

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

.range-btn {
    background: rgba(0, 255, 195, 0.08) !important;
    color: var(--accent-primary) !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 255, 195, 0.25) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.range-btn.active {
    background: var(--accent-primary) !important;
    color: #000 !important;
}

.range-btn:hover {
    background: rgba(0, 255, 195, 0.2) !important;
    transform: translateY(-2px) !important;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}


.secondary-btn {
    background: rgba(0, 255, 195, 0.08) !important;
    color: var(--accent-primary) !important;
    padding: 8px 18px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(0, 255, 195, 0.25) !important;
    border-radius: 40px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.secondary-btn:hover {
    background: rgba(0, 255, 195, 0.2) !important;
    transform: translateY(-2px) !important;
}

.news-container {
    max-height: 400px;
    overflow-y: auto;
}

.calc-input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 195, 0.3);
    border-radius: 12px;
    color: white;
}

.calc-result-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.chat-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.chat-input-row input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
}

.send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    font-weight: 600;
}

.analyze-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d9ff, #00ffc3);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 195, 0.3);
}

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

.sort-buttons button {
    padding: 6px 12px;
    background: rgba(0, 255, 195, 0.08);
    border: 1px solid rgba(0, 255, 195, 0.25);
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.sort-buttons button.active {
    background: var(--accent-primary);
    color: #000;
}


.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

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


.history-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.history-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.history-signature {
    color: var(--accent-primary);
    font-weight: 500;
}

.timeline {
    position: relative;
    padding: 20px 0 10px 0;
    margin-top: 10px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary), transparent);
    opacity: 0.6;
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
    padding-left: 20px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.timeline-item.in {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 195, 0.4);
    margin-top: 6px;
    position: relative;
    z-index: 2;
    border: 2px solid var(--bg-darker);
}

.timeline-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(0, 255, 195, 0.3);
    transform: translateX(6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.timeline-date {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(0, 255, 195, 0.12);
    padding: 2px 12px;
    border-radius: 40px;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 4px 0 10px 0;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.timeline-content .history-signature {
    color: var(--accent-primary);
    font-weight: 500;
    font-style: italic;
    margin-top: 8px;
}


.spinner-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 255, 195, 0.15);
    border-top-color: #00ffc3;
    border-right-color: #00d9ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.spinner-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,255,195,0.2);
    border-top-color: #00ffc3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


.comparator-grid .compare-card,
.comparator-grid .compare-vs,
.comparator-grid .compare-result {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.comparator-grid .compare-card:nth-child(1) { animation-delay: 0.1s; }
.comparator-grid .compare-vs { animation-delay: 0.2s; }
.comparator-grid .compare-card:nth-child(3) { animation-delay: 0.3s; }
.comparator-grid .compare-result { animation-delay: 0.4s; }

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

/* ============================================================
   FADE-IN PARA GRÁFICOS (CANVAS)
   ============================================================ */
.chart-container canvas {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.chart-container canvas.visible {
    opacity: 1;
}

/* ============================================================
   NUEVA SECCIÓN: SUGERENCIAS Y MEJORAS
   ============================================================ */
.sugerencia-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.sugerencia-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.sugerencia-form label .required {
    color: #ff6b6b;
    margin-left: 4px;
}

.sugerencia-form input,
.sugerencia-form select,
.sugerencia-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.3s;
}

.sugerencia-form input:focus,
.sugerencia-form select:focus,
.sugerencia-form textarea:focus {
    border-color: #00ffc3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 195, 0.1);
}

.sugerencia-form textarea {
    resize: vertical;
    min-height: 120px;
}

.sugerencia-form .submit-btn {
    background: linear-gradient(135deg, #00ffc3, #00d9ff);
    border: none;
    padding: 16px 32px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 0 20px rgba(0, 255, 195, 0.15);
}

.sugerencia-form .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 195, 0.3);
}

.sugerencia-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sugerencia-form .form-message {
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 500;
    display: none;
}

.sugerencia-form .form-message.success {
    display: block;
    background: rgba(0, 255, 195, 0.15);
    border: 1px solid #00ffc3;
    color: #00ffc3;
}

.sugerencia-form .form-message.error {
    display: block;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

@media (max-width: 600px) {
    .sugerencia-form .submit-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   RESPONSIVE PARA SECCIÓN DE SUGERENCIAS
   ============================================================ */
@media (max-width: 768px) {
    .sugerencia-form input,
    .sugerencia-form select,
    .sugerencia-form textarea {
        font-size: 0.9rem;
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .sugerencia-form label {
        font-size: 0.8rem;
    }
    .sugerencia-form .submit-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================================
   RESPONSIVE GENERAL (sin cambios)
   ============================================================ */
@media (max-width: 900px) {
    .top-nav {
        padding: 12px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .ticker-container {
        margin-top: 120px;
    }
    .stock-info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .stock-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {
  
    .hero {
        padding: 80px 20px 60px !important;
    }
    .hero h1 {
        font-size: 2.4rem !important;
        text-shadow: 0 0 40px rgba(0, 255, 195, 0.1);
    }
    .hero-description {
        font-size: 0.95rem;
    }
    .btn-primary, .btn-secondary {
        padding: 14px 28px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

  
    .top-nav {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .nav-brand {
        flex: 1;
    }
    .nav-btn {
        order: 2;
        margin-left: auto;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        width: 100%;
        margin-top: 8px;
        order: 3;
        background: transparent;
        padding: 0;
        border: none;
    }
    .nav-links a {
        padding: 8px 12px;
        font-size: 0.8rem;
        border-bottom: none;
        width: auto;
        text-align: center;
    }

  
    .ticker-track {
        animation-duration: 60s !important;
    }

   
    .container {
        padding: 16px 12px 40px;
        gap: 24px;
    }
    .card {
        padding: 24px;
        border-radius: 20px;
        margin-bottom: 32px;
    }
    .card h2 {
        font-size: 1.3rem;
    }
    .card h2::after {
        width: 40px;
        bottom: -10px;
    }

   
    .stock-info-card {
        padding: 16px !important;   
    }
    .stock-price {
        font-size: 2rem !important; 
    }
    .stock-change {
        font-size: 0.9rem !important;
        margin-left: 8px !important;
    }
    .stock-name {
        font-size: 1.2rem !important;
    }
    .stock-badge {
        font-size: 0.6rem !important;
        margin-bottom: 6px !important;
    }
    .stock-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .stat-item {
        padding: 6px 8px !important;
    }
    .stat-value {
        font-size: 0.9rem !important;
    }
    .stat-label {
        font-size: 0.6rem !important;
    }
    .chart-container {
        height: 200px !important;    
    }
    .chart-card {
        padding: 16px !important;
    }

  
    .comparator-header {
        flex-direction: column;
        gap: 12px;
    }
    .comparator-select {
        width: 100%;
        min-width: unset;
    }
    .vs-badge {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    .compare-btn {
        font-size: 0.9rem;
        padding: 12px;
    }
    .comparator-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .compare-card {
        padding: 16px;
    }
    .compare-price {
        font-size: 1.6rem;
    }
    .compare-details {
        flex-wrap: wrap;
        gap: 4px;
    }
    .compare-details div {
        flex: 1 0 45%;
    }

    
    .chat-box {
        height: 280px;
        padding: 14px;
    }
    .chat-input-row {
        flex-direction: column;
    }
    .send-btn {
        width: 100%;
        padding: 12px;
    }


    .sofipo-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .sofipo {
        padding: 16px;
    }
    .sofipo-rate {
        font-size: 28px;
    }

  
    .gloss-q {
        font-size: 16px;
        padding: 16px 18px;
    }

  
    .timeline::before {
        left: 14px;
    }
    .timeline-item {
        padding-left: 6px;
        gap: 16px;
    }
    .timeline-dot {
        flex: 0 0 12px;
        width: 12px;
        height: 12px;
        margin-top: 4px;
    }
    .timeline-content {
        padding: 16px 18px;
    }
    .timeline-content h3 {
        font-size: 1rem;
    }
    .timeline-content p {
        font-size: 0.85rem;
    }

  
    .warning {
        font-size: 0.55rem;
        max-width: 240px;
    }
    .news-title {
        font-size: 0.85rem;
    }
    .news-summary {
        font-size: 0.7rem;
    }

    .hamburger,
    .hamburger:hover,
    .nav-links.open,
    .nav-links.open a {
        display: none !important;
    }
}


@media (max-width: 600px) {
    .nav-links {
        gap: 4px;
    }
    .nav-link {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    .ticker-container {
        margin-top: 140px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn-primary, .btn-secondary {
        width: 80%;
        text-align: center;
    }
   
    .stock-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .search-row {
        flex-direction: column;
    }
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .chart-container {
        height: 180px !important;
    }
    .stock-price {
        font-size: 1.8rem !important;
    }
    .stock-change {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 16px 40px !important;
    }
    .hero h1 {
        font-size: 1.8rem !important;
    }
    .hero-badge {
        font-size: 0.65rem;
        padding: 6px 14px;
    }
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .container {
        gap: 20px;
    }
    .card {
        padding: 20px;
        margin-bottom: 24px;
    }
    .card h2 {
        font-size: 1.1rem;
    }

    .stock-info-card {
        padding: 12px !important;
    }
    .stock-price {
        font-size: 1.6rem !important;
    }
    .stock-change {
        font-size: 0.8rem !important;
    }
    .stock-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
    }
    .stat-item {
        padding: 4px 6px !important;
    }
    .stat-value {
        font-size: 0.8rem !important;
    }
    .stat-label {
        font-size: 0.55rem !important;
    }
    .chart-container {
        height: 150px !important;
    }
    .chart-card {
        padding: 12px !important;
    }

    .compare-price {
        font-size: 1.4rem;
    }
    .stats strong {
        font-size: 1.2rem !important;
    }
    #stockTable td {
        padding: 8px 5px;
        font-size: 0.85rem;
    }
    .warning {
        font-size: 0.5rem;
        max-width: 200px;
    }
    .ranking-item {
        padding: 8px 12px;
    }
    .ranking-position {
        font-size: 0.9rem;
        width: 30px;
    }
    .ranking-symbol {
        font-size: 0.85rem;
    }
    .ranking-count {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    .sofipo-grid {
        grid-template-columns: 1fr;
    }
}