/* Morning Signals Blog - Custom CSS from Scratch */

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

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #343A40;
    background-color: #FAFAFA;
    margin: 0;
    padding: 0;
    font-weight: 400;
}

/* Universal Font Application */
*, *::before, *::after {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Ensure all text elements inherit Inter */
html, body, main, section, article, header, footer, nav, aside, div, span, p, h1, h2, h3, h4, h5, h6, a, button, input, textarea, select, label, li, ul, ol, table, td, th, tr, caption, blockquote, code, pre, small, strong, em, b, i, u, mark, del, ins, sub, sup {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Specific Element Font Enforcement */
h1, h2, h3, h4, h5, h6,
p, span, div, a, button, input, textarea, select,
.nav-item, .brand-link, .article-title, .article-author,
.banner-title, .banner-subtitle, .banner-algo, .banner-trader,
.article-tag, .read-more, .read-arrow,
.tool-title, .tool-description, .tool-icon,
.hero-title, .hero-subtitle, .feature-title, .feature-description,
.article-detail-title, .article-detail-author, .article-detail-date,
.article-detail-tag, .back-to-articles-btn,
.card-title, .card-body, .list-none li,
.btn, .btn-primary, .btn-secondary,
.author-name, .article-date, .article-meta,
.article-detail-meta, .author-info, .author-info-large,
.article-detail-description, .article-detail-body,
.article-content, .article-content-wrapper,
.footer-text, .container, .main-wrapper,
.articles-title, .articles-subtitle, .tools-title, .tools-subtitle,
.hero-actions, .feature-card, .tool-card,
.article-card, .article-link, .article-content,
.article-footer, .article-meta, .author-avatar,
.article-detail-header, .article-detail-content, .article-detail-footer,
.article-detail-cover, .article-detail-placeholder,
.article-detail-tags, .article-detail-tag,
.back-arrow, .read-arrow, .nav-text, .nav-icon {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #FAFAFA;
    border-bottom: 1px solid #E9ECEF;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

/* Brand Section */
.brand-section {
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    padding: 1.7rem 0 1rem 1.5rem;
    margin: 0;
    z-index: 1001;
}

.brand-link {
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-algo {
    color: #1A3B5B;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-right: 0.25em;
}

.brand-trader {
    color: #1A3B5B;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-blog {
    color: #1A3B5B;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.blog-icon {
    width: 0.6em;
    height: 0.6em;
    vertical-align: middle;
    display: inline-block;
    margin-left: 0.3em;
    transition: all 0.3s ease;
}

.blog-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Logo integration styles */
.logo-i {
    display: inline-block;
    vertical-align: baseline;
    margin: 0 0.1em;
}

.logo-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: baseline;
    display: inline-block;
    transition: all 0.3s ease;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-algo .logo-icon,
.brand-trader .logo-icon {
    color: #1A3B5B;
}

.brand-algo .logo-icon svg,
.brand-trader .logo-icon svg {
    color: #1A3B5B;
}

.banner-algo .logo-icon,
.banner-trader .logo-icon {
    color: #E7E8EA;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.banner-algo .logo-icon svg,
.banner-trader .logo-icon svg {
    color: #E7E8EA;
}

/* Hide brand on Articles page */
body.articles-page .brand-section {
    display: none;
}

/* Header Navigation */
.header-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: none;
    color: #6C757D;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}

.nav-item:hover {
    color: #1A3B5B;
    background: rgba(26, 59, 91, 0.1);
    transform: none;
}

.nav-item.active {
    color: #1A3B5B;
    font-weight: 600;
    background: rgba(26, 59, 91, 0.1);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    width: 20px;
    height: 20px;
}

.nav-text {
    font-weight: inherit;
    color: inherit;
}

/* Login Section - Positioned absolutely to the right */
.login-section {
    position: absolute;
    right: 1rem;
    top: 0;
    transform: none;
    padding: 1rem 0;
}

/* Login Button - Smaller and compact */
.login-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #1A3B5B;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.login-btn:hover {
    background: #0F2A47;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(26, 59, 91, 0.2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(26, 59, 91, 0.2);
}

.login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.login-text {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Main Wrapper */
.main-wrapper {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

/* Brand Link Animation */
.brand-link {
    transition: transform 0.15s ease;
}


/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
}

/* Article Detail Styles */
.article-detail-header {
    background-color: #FFFFFF;
    padding: 2rem 0;
    border-bottom: 1px solid #E9ECEF;
    margin: 0 2rem;
}

.article-detail-cover {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.article-detail-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.article-detail-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-detail-placeholder-content {
    text-align: center;
    color: white;
}

.article-detail-placeholder-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6C757D;
    z-index: 1;
}

.image-loading .loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1A3B5B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.image-loading p {
    margin: 0;
    font-size: 0.875rem;
}

.article-detail-meta {
    max-width: 800px;
    margin: 0 0 2rem 0;
}

.article-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #343A40;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.article-detail-description {
    font-size: 1.125rem;
    color: #6C757D;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.article-detail-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.author-avatar-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1A3B5B, #1A3B5B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.author-info-large {
    display: flex;
    flex-direction: column;
}

.author-name-large {
    font-weight: 600;
    color: #343A40;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.article-date-large {
    color: #6C757D;
    font-size: 0.875rem;
}

.article-detail-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-detail-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.article-detail-content {
    background-color: #FFFFFF;
    padding: 3rem 0;
    margin: 0 2rem;
}

.article-detail-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #343A40;
}

.article-detail-body h1,
.article-detail-body h2,
.article-detail-body h3,
.article-detail-body h4,
.article-detail-body h5,
.article-detail-body h6 {
    color: #343A40;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-detail-body h1 {
    font-size: 2rem;
}

.article-detail-body h2 {
    font-size: 1.75rem;
}

.article-detail-body h3 {
    font-size: 1.5rem;
}

.article-detail-body p {
    margin-bottom: 1.5rem;
}

.article-detail-body ul,
.article-detail-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-detail-body li {
    margin-bottom: 0.5rem;
}

.article-detail-body blockquote {
    border-left: 4px solid #1A3B5B;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6C757D;
}

.article-detail-body code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.article-detail-body pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-detail-body pre code {
    background: none;
    padding: 0;
}

/* Article Content Wrapper */
.article-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}


.article-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #343A40;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #343A40;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #1A3B5B;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6C757D;
}

.article-content code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.article-content pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Override Tailwind classes with pure CSS */
.space-y-8 > * + * {
    margin-top: 2rem;
}

.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343A40;
    margin-bottom: 1rem;
}

.list-none {
    list-style: none;
    padding-left: 0;
}

.flex {
    display: flex;
}

.gap-3 {
    gap: 0.75rem;
}

.items-start {
    align-items: flex-start;
}

.text-primary {
    color: #1A3B5B;
}

.shrink-0 {
    flex-shrink: 0;
}

.font-bold {
    font-weight: 700;
}

.text-lg {
    font-size: 1.125rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-2xl {
    font-size: 1.5rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-gray-600 {
    color: #6C757D;
}

.text-gray-500 {
    color: #6C757D;
}

.text-red-500 {
    color: #dc3545;
}

.hidden {
    display: none;
}

.grid {
    display: grid;
}

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

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

.md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
.md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gap-4 {
    gap: 1rem;
}

.form-control {
    margin-bottom: 1rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #343A40;
}

.label-text {
    font-size: 0.875rem;
}

.select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    background-color: #FFFFFF;
    font-size: 0.875rem;
}

.select-bordered {
    border: 1px solid #E9ECEF;
}

.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    background-color: #FFFFFF;
    font-size: 0.875rem;
}

.input-bordered {
    border: 1px solid #E9ECEF;
}

.input-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.bg-base-200 {
    background-color: #f8f9fa;
}

.rounded-lg {
    border-radius: 8px;
}

.h-12 {
    height: 3rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.text-lg {
    font-size: 1.125rem;
}

.font-semibold {
    font-weight: 600;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.link {
    color: #1A3B5B;
    text-decoration: underline;
}

.link-primary {
    color: #1A3B5B;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-x-auto {
    overflow-x: auto;
}

.border-collapse {
    border-collapse: collapse;
}

.w-full {
    width: 100%;
}

.border-collapse {
    border-collapse: collapse;
}

.text-sm {
    font-size: 0.875rem;
}

.bg-base-200 {
    background-color: #f8f9fa;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.text-base-content {
    color: #343A40;
}

.text-base-content\/70 {
    color: rgba(52, 58, 64, 0.7);
}

.w-4 {
    width: 1rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1A3B5B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    border-style: solid;
}

.loading-lg {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

.text-primary {
    color: #1A3B5B;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.last\:mb-0:last-child {
    margin-bottom: 0;
}

.w-24 {
    width: 6rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.text-gray-600 {
    color: #6C757D;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-0\.5 {
    gap: 0.125rem;
}

.bg-emerald-500 {
    background-color: #10b981;
}

.bg-blue-500 {
    background-color: #1A3B5B;
}

.text-white {
    color: #FFFFFF;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.px-1\.5 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.list-decimal {
    list-style-type: decimal;
}

.pl-4 {
    padding-left: 1rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.text-sm {
    font-size: 0.875rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.bg-base-100 {
    background-color: #FFFFFF;
}

.text-gray-600 {
    color: #6C757D;
}

.relative {
    position: relative;
}

.rounded-md {
    border-radius: 6px;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.absolute {
    position: absolute;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.right-0 {
    right: 0;
}

.pr-3 {
    padding-right: 0.75rem;
}

.pointer-events-none {
    pointer-events: none;
}

.text-gray-500 {
    color: #6C757D;
}

.sm\:text-sm {
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .sm\:text-sm {
        font-size: 0.875rem;
    }
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.list-disc {
    list-style-type: disc;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

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

/* SVG Icon Styles */
.h-5 {
    height: 1.25rem;
}

.w-5 {
    width: 1.25rem;
}

.h-8 {
    height: 2rem;
}

.w-8 {
    width: 2rem;
}

/* Additional utility classes */
.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.gap-3 {
    gap: 0.75rem;
}

.items-start {
    align-items: flex-start;
}

.text-primary {
    color: #1A3B5B;
}

.shrink-0 {
    flex-shrink: 0;
}

.font-bold {
    font-weight: 700;
}

.text-lg {
    font-size: 1.125rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-2xl {
    font-size: 1.5rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-gray-600 {
    color: #6C757D;
}

.text-gray-500 {
    color: #6C757D;
}

.text-red-500 {
    color: #dc3545;
}

.hidden {
    display: none;
}

.grid {
    display: grid;
}

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

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

.md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gap-4 {
    gap: 1rem;
}

.form-control {
    margin-bottom: 1rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #343A40;
}

.label-text {
    font-size: 0.875rem;
}

.select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    background-color: #FFFFFF;
    font-size: 0.875rem;
}

.select-bordered {
    border: 1px solid #E9ECEF;
}

.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    background-color: #FFFFFF;
    font-size: 0.875rem;
}

.input-bordered {
    border: 1px solid #E9ECEF;
}

.input-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.bg-base-200 {
    background-color: #f8f9fa;
}

.rounded-lg {
    border-radius: 8px;
}

.h-12 {
    height: 3rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.text-lg {
    font-size: 1.125rem;
}

.font-semibold {
    font-weight: 600;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.link {
    color: #1A3B5B;
    text-decoration: underline;
}

.link-primary {
    color: #1A3B5B;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-x-auto {
    overflow-x: auto;
}

.border-collapse {
    border-collapse: collapse;
}

.w-full {
    width: 100%;
}

.border-collapse {
    border-collapse: collapse;
}

.text-sm {
    font-size: 0.875rem;
}

.bg-base-200 {
    background-color: #f8f9fa;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.text-base-content {
    color: #343A40;
}

.text-base-content\/70 {
    color: rgba(52, 58, 64, 0.7);
}

.w-4 {
    width: 1rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1A3B5B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    border-style: solid;
}

.loading-lg {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

.text-primary {
    color: #1A3B5B;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.last\:mb-0:last-child {
    margin-bottom: 0;
}

.w-24 {
    width: 6rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.text-gray-600 {
    color: #6C757D;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-0\.5 {
    gap: 0.125rem;
}

.bg-emerald-500 {
    background-color: #10b981;
}

.bg-blue-500 {
    background-color: #1A3B5B;
}

.text-white {
    color: #FFFFFF;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.px-1\.5 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.list-decimal {
    list-style-type: decimal;
}

.pl-4 {
    padding-left: 1rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.text-sm {
    font-size: 0.875rem;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.bg-base-100 {
    background-color: #FFFFFF;
}

.text-gray-600 {
    color: #6C757D;
}

.relative {
    position: relative;
}

.rounded-md {
    border-radius: 6px;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.absolute {
    position: absolute;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.right-0 {
    right: 0;
}

.pr-3 {
    padding-right: 0.75rem;
}

.pointer-events-none {
    pointer-events: none;
}

.text-gray-500 {
    color: #6C757D;
}

.sm\:text-sm {
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .sm\:text-sm {
        font-size: 0.875rem;
    }
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.list-disc {
    list-style-type: disc;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.article-detail-footer {
    background-color: #F8F9FA;
    padding: 2rem 0;
    border-top: 1px solid #E9ECEF;
    margin: 0 2rem;
}

.back-to-articles-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #1A3B5B;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-articles-btn:hover {
    background-color: #1A3B5B;
    transform: translateY(-1px);
}

.back-arrow {
    font-size: 1.25rem;
}

/* Responsive Design for Article Detail */
@media (max-width: 768px) {
    .article-detail-header,
    .article-detail-content,
    .article-detail-footer {
        margin: 0 1rem;
    }
    
    .article-detail-title {
        font-size: 2rem;
    }
    
    .article-detail-cover {
        height: 200px;
    }
    
    .article-detail-description {
        font-size: 1rem;
    }
    
    .article-detail-body {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .calculator-header {
        padding: 1.75rem 1rem;
        margin-top: 0.75rem;
    }
    .article-detail-header,
    .article-detail-content,
    .article-detail-footer {
        margin: 0 0.5rem;
    }
    
    .article-detail-title {
        font-size: 1.75rem;
    }
    
    .article-detail-cover {
        height: 150px;
    }
    
    .article-detail-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .author-avatar-large {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

/* Footer */
.footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-text {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Use the header as a flex container with two rows */
    .fixed-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 0.5rem 0.5rem;
    }
    
    /* Header layout becomes 2 rows: brand/login on top, nav bar below */
    .header-content {
        order: 2;
        width: 100%;
        padding: 0.5rem 0 0.375rem;
        justify-content: flex-start;
        align-items: stretch;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .brand-section {
        order: 1;
        position: static;
        left: auto;
        top: auto;
        transform: none;
        padding: 0;
        margin: 0;
    }
    
    .brand-link {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 1.1em;
        height: 1.1em;
    }
    
    .blog-icon {
        width: 0.5em;
        height: 0.5em;
        margin-left: 0.25em;
    }
    
    /* Mobile nav as a full-width pill bar with icons */
    .header-navigation {
        width: 100%;
        gap: 0.25rem;
        background: #1A3B5B;
        border-radius: 10px;
        padding: 0.375rem;
        justify-content: space-between;
    }
    
    .nav-item {
        padding: 0.5rem 0.25rem;
        font-size: 0.8125rem;
        color: #E7E8EA;
        flex: 1;
        justify-content: center;
    }
    
    .nav-item:hover,
    .nav-item.active {
        color: #FFFFFF;
        background: rgba(255, 255, 255, 0.12);
    }
    
    .nav-text {
        display: none;
    }
    

    .login-section {
        order: 1;
        position: static;
        margin-left: auto;
        padding: 0;
    }
    
    .login-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .main-wrapper {
        margin-top: 80px;
    }
    
    .main-content {
        padding: 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 0.5rem 0.5rem 0.375rem;
    }
    
    .brand-link {
        font-size: 1.125rem;
    }
    
    .logo-icon {
        width: 1em;
        height: 1em;
    }
    
    .blog-icon {
        width: 0.4em;
        height: 0.4em;
        margin-left: 0.2em;
    }
    
    .login-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .login-text { display: none; }
    
    .header-navigation {
        padding: 0.25rem;
        border-radius: 8px;
    }
    
    .nav-item { padding: 0.4rem 0.25rem; }
    
    .tools-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .tools-text { display: none; }
    
    .hero { padding: 2rem 0; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .features { padding: 2rem 0; }
    .section-title { font-size: 1.75rem; }
    
    .sidebar-nav-link { padding: 0.875rem 1.25rem; }
    
    .nav-text { font-size: 0.9rem; }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #1A3B5B;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #1A3B5B;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6C757D;
}

.btn-secondary:hover {
    background-color: #1A3B5B;
}

/* Card Styles */
.card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.card-body {
    color: #374151;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 3px rgba(26, 59, 91, 0.1);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Hero Section */
.hero {
    background-color: #FFFFFF;
    color: #343A40;
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid #E9ECEF;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #343A40;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #6C757D;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: #FFFFFF;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: #343A40;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background-color: #FFFFFF;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E9ECEF;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #1A3B5B;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-icon:empty {
    display: none;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343A40;
    margin-bottom: 1rem;
}

.feature-description {
    color: #6C757D;
    line-height: 1.6;
}

/* Responsive Design for Hero and Features */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Articles Styles */
/* Morning Signals Banner */
.algotrader-banner {
    background: #1A3B5C;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.algotrader-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 60px 60px;
    opacity: 0.3;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.banner-algo {
    color: #E7E8EA;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin-right: 0.25em;
}

.banner-trader {
    color: #E7E8EA;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.banner-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    color: #E7E8EA;
    margin: 1rem 0 0 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.articles-section {
    padding: 3rem 0;
    background-color: #ffffff;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #E9ECEF;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #1A3B5B;
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-image {
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.article-card:hover .article-cover-image {
    transform: scale(1.05);
}

.article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-category {
    background: rgba(255, 255, 255, 0.9);
    color: #1A3B5B;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.article-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #343A40;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.4rem; /* 3 lines * 1.3 line-height * 1.125rem */
    letter-spacing: -0.01em;
}

.article-description {
    color: #6C757D;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8125rem;
}

.article-meta {
    margin-bottom: 0.75rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1A3B5B, #1A3B5B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.6875rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #343A40;
    font-size: 0.75rem;
}

.article-date {
    color: #6C757D;
    font-size: 0.625rem;
}

.article-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.article-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
    font-size: 0.625rem;
    font-weight: 500;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.read-more {
    color: #1A3B5B;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.read-arrow {
    color: #1A3B5B;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.article-card:hover .read-arrow {
    transform: translateX(4px);
}

/* Responsive Design for Articles */
@media (max-width: 768px) {
    .algotrader-banner {
        padding: 4rem 0;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-subtitle {
        font-size: 0.875rem;
        margin: 0.75rem 0 0 0;
    }
    
    .articles-section {
        padding: 2rem 0;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-title {
        font-size: 1rem;
        height: 3.9rem;
    }
}

@media (max-width: 480px) {
    .articles-title {
        font-size: 1.75rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .article-image {
        height: 100px;
    }
    
    .article-cover-image {
        height: 100px;
    }
    
    .article-content {
        height: calc(100% - 100px);
        padding: 0.75rem;
    }
    
    .article-title {
        font-size: 1rem;
        height: auto;
        -webkit-line-clamp: 2;
    }
}

/* Tools Styles */
.tools-header {
    background-color: #FFFFFF;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #E9ECEF;
}

.tools-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #343A40;
    margin-bottom: 1rem;
}

.tools-subtitle {
    font-size: 1.125rem;
    color: #6C757D;
    max-width: 600px;
    margin: 0 auto;
}

.tools-section {
    padding: 3rem 0;
    background-color: #ffffff;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1A3B5B;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #1A3B5B;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    gap: 1.5rem;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: #1A3B5B;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-content {
    flex-grow: 1;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #343A40;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: #6C757D;
    line-height: 1.5;
    font-size: 0.875rem;
}

.tool-arrow {
    color: #1A3B5B;
    font-size: 1.5rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-arrow {
    transform: translateX(8px);
}

/* Responsive Design for Tools */
@media (max-width: 768px) {
    .tools-header {
        padding: 2rem 0;
    }
    
    .tools-title {
        font-size: 2rem;
    }
    
    .tools-subtitle {
        font-size: 1rem;
    }
    
    .tools-section {
        padding: 2rem 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-link {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
    }
    
    .tool-name {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .tools-title {
        font-size: 1.75rem;
    }
    
    .tool-link {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
    }
    
    .tool-content {
        order: 2;
    }
    
    .tool-arrow {
        order: 3;
        align-self: center;
    }
}

/* ========================================
   CRYPTO CALCULATOR STYLES
   ======================================== */

/* Calculator Container */
.calculator-container {
    max-width: 1000px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.calculator-card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.calculator-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Calculator Header */
.calculator-header {
    background: linear-gradient(135deg, #F9FAFB 0%, #FFFFFF 100%);
    padding: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

.calculator-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
}

.calculator-description {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

/* Calculator Inputs */
.calculator-inputs {
    padding: 2rem;
}

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

.input-group {
    position: relative;
}

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

.input-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 600;
}

.input-icon.btc-icon {
    background: linear-gradient(135deg, #F7931A 0%, #FF6B35 100%);
}

.input-icon.ibit-icon {
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    transition: all 0.15s ease;
    overflow: hidden;
}

.input-wrapper:hover {
    border-color: #D1D5DB;
}

.input-wrapper.focused {
    border-color: #1A3B5B;
    box-shadow: 0 0 0 3px rgba(26, 59, 91, 0.1);
}

.currency-symbol {
    padding: 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #6B7280;
    background: #F9FAFB;
    border-right: 1px solid #E5E7EB;
}

.price-input {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1F2937;
    background: transparent;
    font-family: 'Courier New', monospace;
}

.price-input::placeholder {
    color: #9CA3AF;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.formatted-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1A3B5B;
    font-family: 'Courier New', monospace;
}

.input-hint {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Conversion Arrow */
.conversion-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.arrow-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #1A3B5B, #2C5282);
    border-radius: 1px;
}

.arrow-head {
    width: 32px;
    height: 32px;
    background: #1A3B5B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.conversion-ratio {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    background: #F3F4F6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* Calculator Results */
.calculator-results {
    padding: 2rem;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
}

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

.result-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.result-card.highlight {
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
    color: #FFFFFF;
    border-color: #1A3B5B;
}

.result-card.highlight .result-value {
    color: #FFFFFF;
}

.result-card.calculating {
    animation: calculatePulse 0.3s ease-in-out;
}

@keyframes calculatePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

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

.result-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.8;
}

.result-icon {
    font-size: 1.125rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
}

.result-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 500;
}

/* Calculator Info */
.calculator-info {
    padding: 2rem;
    background: #FFFFFF;
}

.info-card {
    background: #DBEAFE;
    border: 1px solid #1A3B5B;
    border-radius: 16px;
    padding: 1.5rem;
}

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

.info-header svg {
    color: #1A3B5B;
}

.info-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A3B5B;
}

.info-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
}

/* Responsive Design for Calculator */
@media (max-width: 768px) {
    .calculator-container {
        margin: 1rem auto 0;
        padding: 0 1rem;
    }
    
    .calculator-header {
        padding: 2rem 1.25rem; /* more breathing room */
        margin-top: 0.75rem;  /* space under mobile nav */
    }
    
    .calculator-inputs {
        padding: 1.5rem;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .conversion-arrow {
        transform: rotate(90deg);
        order: 2;
    }
    
    .arrow-line {
        width: 40px;
        height: 2px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-results,
    .calculator-info {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .input-icon {
        width: 32px;
        height: 32px;
    }
    
    .result-value {
        font-size: 1.25rem;
    }
    
    .calculator-container {
        padding: 0 0.5rem;
    }
}

/* ========================================
   OPTIONS CALCULATOR STYLES
   ======================================== */

/* Options Container */
.options-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Options Header */
.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.options-title-section {
    flex: 1;
}

.options-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
}

.options-actions {
    display: flex;
    align-items: center;
}

.logout-btn {
    background: #EF4444;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.logout-btn:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

/* Ticker Section */
.ticker-section {
    margin-bottom: 2rem;
}

.ticker-card {
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: #FFFFFF;
}

.ticker-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.ticker-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ticker-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.ticker-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ticker-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.ticker-submit-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ticker-submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Main Content Grid */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.left-column {
    width: 100%;
}

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

/* Cards */
.base-info-card,
.calculate-card,
.tier2-card,
.trade-details-card,
.scales-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.25s ease;
}

.base-info-card:hover,
.calculate-card:hover,
.tier2-card:hover,
.trade-details-card:hover,
.scales-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 1rem 0;
}

/* Form Fields */
.form-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.field-input {
    padding: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: all 0.15s ease;
    background: #FFFFFF;
}

.field-input:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 2px rgba(26, 59, 91, 0.1);
}

.field-select {
    padding: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.15s ease;
}

.field-select:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 2px rgba(26, 59, 91, 0.1);
}

.field-display {
    padding: 0.5rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 500;
}

/* Toggle Buttons */
.toggle-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #F9FAFB;
    color: #374151;
    align-self: flex-start;
}

.toggle-btn:hover {
    background: #F3F4F6;
}

/* Input with Percentage */
.input-with-percentage {
    position: relative;
}

.percentage-display {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: #EF4444;
}

/* Calculate Table */
.calculate-table-container {
    overflow-x: auto;
}

.calculate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.calculate-table th {
    background-color: #F9FAFB;
    color: #6B7280;
    font-weight: 600;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.calculate-table th.text-center {
    text-align: center;
}

.calculate-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #F3F4F6;
    font-size: 0.75rem;
    color: #374151;
}

.calculate-table td.text-center {
    text-align: center;
}

.calculate-table tbody tr:hover {
    background-color: #F9FAFB;
}

.calculate-table tbody tr:last-child td {
    border-bottom: none;
}

/* Bottom Row */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Datapoints List */
.datapoints-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.datapoint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.datapoint-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.75rem;
}

.status-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* Trade Details */
.trade-details-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bto-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trade-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.metric-label {
    font-size: 0.625rem;
    color: #6B7280;
    font-weight: 500;
}

.metric-value {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1F2937;
}

.metric-value.highlight {
    font-size: 1rem;
    font-weight: 700;
}

/* Scales List */
.scales-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scale-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.75rem;
}

.scale-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1F2937;
    font-size: 0.75rem;
}

/* No Trade Message */
.no-trade-message {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 6px;
    color: #B91C1C;
    font-size: 0.75rem;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .bottom-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .options-container {
        padding: 1rem;
    }
    
    .options-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .ticker-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ticker-submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .trade-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .options-container {
        padding: 0.5rem;
    }
    
    .ticker-card {
        padding: 1rem;
    }
    
    .trade-metrics {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   AUTHENTICATION STYLES
   ======================================== */

/* Authentication Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F9FAFB 0%, #E5E7EB 100%);
    padding: 2rem;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
}

/* Authentication Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: #FFFFFF;
    box-shadow: 0 8px 16px rgba(26, 59, 91, 0.3);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 0.75rem 0;
}

.auth-description {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin: 0;
    line-height: 1.5;
}

/* Error Alert */
.error-alert {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

.error-icon {
    color: #EF4444;
    flex-shrink: 0;
}

.error-message {
    color: #B91C1C;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Authentication Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.label-text {
    display: block;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #1F2937;
    background: #FFFFFF;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 3px rgba(26, 59, 91, 0.1);
    background: #FAFBFC;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

/* Form Actions */
.form-actions {
    margin-top: 0.5rem;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(26, 59, 91, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #0F2A3F 0%, #1A3B5B 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -2px rgba(26, 59, 91, 0.4);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(26, 59, 91, 0.3);
}

.btn-text {
    font-weight: 600;
}

.btn-icon {
    transition: transform 0.15s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(2px);
}

/* Authentication Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #F3F4F6;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-link:hover {
    color: #1A3B5B;
    background: #F9FAFB;
    transform: translateX(-2px);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Authentication */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        max-width: 100%;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }
    
    .auth-icon {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
    
    .form-input {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .login-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   INTEREST CONVERTER STYLES
   ======================================== */

/* Interest Converter Container */
.converter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.converter-card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

/* Converter Header */
.converter-header {
    background: #FFFFFF;
    padding: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

.converter-title-section {
    text-align: center;
}

.converter-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
}

.converter-description {
    color: #6B7280;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

/* Converter Body */
.converter-body {
    padding: 2rem;
}

/* Calculators Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Calculator Section */
.calculator-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.25s ease;
}

.calculator-section:hover {
    border-color: #1A3B5B;
    box-shadow: 0 2px 8px rgba(26, 59, 91, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

/* Calculator Content */
.calculator-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rate-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
    background: #FFFFFF;
    transition: all 0.15s ease;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.rate-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.rate-input:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 3px rgba(26, 59, 91, 0.1);
    background: #FAFBFC;
}

.input-suffix {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    font-weight: 600;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Result Card */
.result-card {
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
}

.result-card:hover {
    border-color: #1A3B5B;
    box-shadow: 0 4px 12px rgba(26, 59, 91, 0.1);
}

.result-header {
    margin-bottom: 0.75rem;
}

.result-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    font-family: 'Courier New', monospace;
    color: #1F2937;
}

.result-subtitle {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design for Interest Converter */
@media (max-width: 768px) {
    .converter-container {
        padding: 1rem;
    }
    
    .converter-header {
        padding: 2rem 1.25rem; /* más aire en móvil */
        margin-top: 0.75rem;   /* espacio bajo la nav móvil */
    }
    
    .converter-title {
        font-size: 1.75rem;
    }
    
    .converter-body {
        padding: 1.5rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-section {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
}

/* ========================================
   CALCULATOR TABS STYLES
   ======================================== */

/* Calculator Tabs Container */
.calculator-tabs-container {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

/* Tab Navigation */
.calculator-tabs-nav {
    display: flex;
    background: #FFFFFF;
    border-radius: 16px 16px 0 0;
    border: 1px solid #E5E7EB;
    border-bottom: none;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.tab-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #F9FAFB;
    border-right: 1px solid #E5E7EB;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.tab-nav-item:last-child {
    border-right: none;
}

.tab-nav-item:hover {
    background: #F3F4F6;
}

.tab-nav-item.active {
    background: #FFFFFF;
    color: #1A3B5B;
    font-weight: 600;
}

.tab-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
}

.tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    transition: color 0.25s ease;
}

.tab-nav-item.active .tab-icon {
    color: #1A3B5B;
}

.tab-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.25s ease;
}

.tab-nav-item.active .tab-text {
    color: #1A3B5B;
    font-weight: 600;
}

/* Tab Content */
.calculator-tabs-content {
    background: #FFFFFF;
    border-radius: 0 0 16px 16px;
    border: 1px solid #E5E7EB;
    border-top: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.tab-content {
    display: none;
    padding: 0;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Override calculator container styles for tabs */
.calculator-tabs-content .calculator-container {
    margin: 0;
    padding: 0;
    max-width: none;
}

.calculator-tabs-content .calculator-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin: 0;
    opacity: 1 !important;
    transform: none !important;
}

/* Ensure tab content is visible */
.tab-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide inactive tab content */
.tab-content:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Force calculator card to be visible in tabs */
.calculator-tabs-content .calculator-card.loaded {
    opacity: 1 !important;
    transform: none !important;
}

/* Additional fixes for tab content visibility */
.calculator-tabs-content {
    position: relative;
    z-index: 1;
}

.calculator-tabs-content .tab-content {
    position: relative;
    z-index: 2;
}

/* Fix for calculator card initial state */
.calculator-tabs-content .calculator-card {
    transition: none !important;
}

.calculator-tabs-content .converter-container {
    margin: 0;
    padding: 0;
}

.calculator-tabs-content .converter-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    margin: 0;
}

.calculator-tabs-content .cagr-container {
    margin: 0;
    padding: 0;
}

/* Responsive Design for Calculator Tabs */
@media (max-width: 768px) {
    .calculator-tabs-container {
        padding: 0 1rem;
        margin-top: 1rem;
    }
    
    .calculator-tabs-nav {
        flex-direction: column;
        border-radius: 12px 12px 0 0;
    }
    
    .tab-nav-item {
        border-right: none;
        border-bottom: 1px solid #E5E7EB;
        padding: 1rem 1.25rem;
    }
    
    .tab-nav-item:last-child {
        border-bottom: none;
    }
    
    .tab-nav-item.active::after {
        height: 0;
        width: 3px;
        height: 100%;
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
    }
    
    .tab-text {
        font-size: 0.8rem;
    }
    
    .calculator-tabs-content {
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 480px) {
    .calculator-tabs-container {
        padding: 0 0.75rem;
    }
    
    .tab-nav-item {
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }
    
    .tab-icon {
        width: 18px;
        height: 18px;
    }
    
    .tab-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .converter-container {
        padding: 0.5rem;
    }
    
    .converter-header {
        padding: 1.75rem 1rem;
        margin-top: 0.75rem;
    }
    
    .converter-title {
        font-size: 1.5rem;
    }
    
    .converter-description {
        font-size: 0.875rem;
    }
    
    .converter-body {
        padding: 1rem;
    }
    
    .calculator-section {
        padding: 1rem;
    }
    
    .rate-input {
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .result-card {
        padding: 1.25rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   CAGR CALCULATOR STYLES
   ======================================== */

/* CAGR Container */
.cagr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* CAGR Header */
.cagr-header {
    background: #FFFFFF;
    padding: 2rem;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.cagr-title-section {
    text-align: center;
}

.cagr-title {
    font-size: 2rem;
    font-weight: 700;
    color: #343A40;
    margin: 0 0 0.5rem 0;
}

.cagr-description {
    color: #6C757D;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

/* Year Range Card */
.year-range-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #E5E7EB;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.year-range-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343A40;
    margin: 0;
}

.year-range-display {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.year-range-display span {
    font-size: 1rem;
    font-weight: 600;
    color: #1A3B5B;
    font-family: 'Courier New', monospace;
}

.slider-container {
    margin-top: 1rem;
    /* Sizing variables for consistent proportions */
    --track-height: 10px; /* base track height */
    --handle-size: 22px;  /* handle diameter; auto-tuned to track */
}

/* Custom noUiSlider Styles */
.slider-container .noUi-target {
    background: #E9ECEF;
    border: none;
    border-radius: calc(var(--track-height) / 2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    height: var(--track-height);
    cursor: pointer;
}

.slider-container .noUi-base {
    background: #E9ECEF;
    border-radius: 8px;
    cursor: pointer;
}

.slider-container .noUi-connect {
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(26, 59, 91, 0.3);
}

.slider-container .noUi-horizontal .noUi-handle {
    width: 14px !important;
    height: 15px !important;
    background: linear-gradient(135deg, #1A3B5B 0%, #2C5282 100%) !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(26, 59, 91, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    top: -3px !important;
    right: -5px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.slider-container .noUi-handle:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(26, 59, 91, 0.4);
}

.slider-container .noUi-handle:active {
    transform: scale(1.1);
    box-shadow: 0 1px 4px rgba(26, 59, 91, 0.5);
}

.slider-container .noUi-handle:before,
.slider-container .noUi-handle:after {
    display: none;
}

.slider-container .noUi-tooltip {
    background: #1A3B5B;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

.slider-container .noUi-tooltip:before {
    border-top-color: #1A3B5B;
}

/* Responsive styles for slider handles */
@media (max-width: 768px) {
    .slider-container .noUi-handle {
        width: 24px;
        height: 24px;
        top: -8px;
        right: -12px;
    }
    
    .slider-container .noUi-target {
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slider-container .noUi-handle {
        width: 28px;
        height: 28px;
        top: -9px;
        right: -14px;
    }
    
    .slider-container .noUi-target {
        height: 12px;
    }
}

/* Results Section */
.results-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #E5E7EB;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343A40;
    margin: 0 0 0.5rem 0;
}

.results-subtitle {
    color: #6C757D;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

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

.result-card {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
    overflow: hidden;
    transition: all 0.25s ease;
}

.result-card:hover {
    border-color: #1A3B5B;
    box-shadow: 0 2px 8px rgba(26, 59, 91, 0.1);
}

.result-card-header {
    background: #FFFFFF;
    padding: 1rem;
    border-bottom: 1px solid #E9ECEF;
}

.result-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #343A40;
    margin: 0;
}

.result-card-body {
    padding: 1rem;
}

.result-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E9ECEF;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-item.highlight {
    background: #F0F9FF;
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #E0F2FE;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6C757D;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #343A40;
    font-family: 'Courier New', monospace;
}

.metric-item.highlight .metric-value {
    color: #1A3B5B;
    font-size: 1rem;
    font-weight: 700;
}

.results-note {
    background: #f8f9fa;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 1rem;
}

.note-text {
    font-size: 0.75rem;
    color: #6C757D;
    margin: 0;
    line-height: 1.5;
}

/* Custom Calculator Section */
.custom-calculator-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #E5E7EB;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.custom-calculator-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343A40;
    margin: 0 0 0.5rem 0;
}

.custom-calculator-subtitle {
    color: #6C757D;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.custom-calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.inputs-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #343A40;
    margin: 0;
}

.custom-input {
    padding: 0.75rem;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #343A40;
    background: #FFFFFF;
    transition: all 0.15s ease;
    font-family: 'Courier New', monospace;
}

.custom-input:focus {
    outline: none;
    border-color: #1A3B5B;
    box-shadow: 0 0 0 3px rgba(26, 59, 91, 0.1);
}

.custom-result-card {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
    overflow: hidden;
}

.custom-result-header {
    background: #FFFFFF;
    padding: 1rem;
    border-bottom: 1px solid #E9ECEF;
}

.custom-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #343A40;
    margin: 0;
}

.custom-result-body {
    padding: 1rem;
}

.custom-result-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E9ECEF;
}

.custom-metric-item:last-child {
    border-bottom: none;
}

.custom-metric-item.highlight {
    background: #F0F9FF;
    margin: 0 -1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #E0F2FE;
}

.custom-metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6C757D;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #343A40;
    font-family: 'Courier New', monospace;
}

.custom-metric-item.highlight .custom-metric-value {
    color: #1A3B5B;
    font-size: 1rem;
    font-weight: 700;
}

/* Historical Data Section */
.historical-data-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.historical-data-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343A40;
    margin: 0 0 0.5rem 0;
}

.historical-data-subtitle {
    color: #6C757D;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.historical-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.historical-table th {
    background: #f8f9fa;
    color: #6C757D;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #E9ECEF;
}

.year-column {
    width: 80px;
}

.historical-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #E9ECEF;
    font-size: 0.875rem;
    color: #343A40;
    font-family: 'Courier New', monospace;
}

.historical-table tbody tr:hover {
    background: #f8f9fa;
}

.historical-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive Design for CAGR Calculator */
@media (max-width: 768px) {
    .cagr-container {
        padding: 1rem;
    }
    
    .cagr-header {
        padding: 2rem 1.25rem; /* more breathing room */
        margin-top: 0.75rem;  /* space under mobile nav */
    }
    
    .cagr-title {
        font-size: 1.75rem;
    }
    
    .year-range-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .custom-calculator-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .results-title,
    .custom-calculator-title,
    .historical-data-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .cagr-container {
        padding: 0.5rem;
    }
    
    .cagr-header {
        padding: 1.75rem 1rem; /* slightly larger than before */
        margin-top: 0.75rem;
    }
    
    .cagr-title {
        font-size: 1.5rem;
    }
    
    .year-range-card,
    .results-section,
    .custom-calculator-section,
    .historical-data-section {
        padding: 1rem;
    }
    
    .custom-input {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
}
