/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header + buffer */
}

/* Responsive scroll padding for mobile */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px; /* Less padding on mobile */
    }
}
/* primary color old #2563eb */
:root {
    --primary-color: #3460bf;
    --primary-dark: #1d4ed8;
    --secondary-color: #f8fafc;
    --accent-color: #1b5c46;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --modal-header-height: 150px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgb(171 170 170 / 68%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    padding: 1rem 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.nav-brand a:hover {
    opacity: 0.8;
}

.nav-brand h1 {
    color: #404247;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* X Animation für Nav-Toggle */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-dark)
    );
    color: var(--white);
    padding: 8rem 0 6rem;
    margin-top: 70px;
}

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

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-anbieter {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    /* background: linear-gradient(135deg, #4661e5, #3a99ed); */
    background: linear-gradient(135deg, #4661e5, #5c98cd);
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-anbieter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #4661e5, #3a99ed);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    padding: 0;
    margin: 0;
    width: 100%;
    min-height: 160px; /* Verhindert Layout Shift */
    aspect-ratio: 2.5 / 1; /* Responsive 2.5:1 Verhältnis */
    position: relative;
}

/* Loading-Indikator für Chart-Placeholder */
.chart-placeholder:empty::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: chartLoading 1s linear infinite;
}

@keyframes chartLoading {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#tradingChart {
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

#tradingChart:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    #tradingChart:hover {
        transform: none; /* Deaktiviere Hover-Effekt auf mobilen Geräten */
    }

    .chart-placeholder {
        min-height: 140px; /* Angepasst für mobile Geräte */
        aspect-ratio: 2.2 / 1; /* Etwas kompakter auf mobile */
    }
}

@media (max-width: 480px) {
    .chart-placeholder {
        min-height: 120px; /* Minimale Höhe für sehr kleine Bildschirme */
        aspect-ratio: 2 / 1; /* Kompakteres Verhältnis */
    }
}

/* Animation für Canvas-Loading */
.chart-placeholder canvas {
    opacity: 0;
    animation: fadeInChart 1s ease-out 0.5s forwards;
}

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

/* Calculator Section */
.calculator-section {
    padding: 2rem 0;
    background: var(--secondary-color);
}

.calculator-section h2 {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
        "Roboto", sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.calculator-section > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 3rem;
}

.calculator {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
}

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

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

.input-group input,
.input-group select {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calculate-btn {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.calculate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Comparison Section */
.comparison-section {
    padding: 3rem 0;
}

.comparison-section h2 {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
        "Roboto", sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    position: relative;
}

/* Wrapper für Scroll-Indikator */
.table-wrapper {
    position: relative;
}

/* Scroll-Indikator für mobile Geräte */
.table-scroll-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Linker Scroll-Indikator */
.table-scroll-indicator-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Zeige Blur-Effekt nur auf mobilen Geräten und wenn scrollbar */
@media (max-width: 1060px) {
    .table-wrapper.scrollable .table-scroll-indicator {
        opacity: 1;
    }

    .table-wrapper.scrolled-to-end .table-scroll-indicator {
        opacity: 0;
    }

    .table-wrapper.scrolled .table-scroll-indicator-left {
        opacity: 1;
    }

    .table-wrapper.scrolled-to-start .table-scroll-indicator-left {
        opacity: 0;
    }
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    contain: layout style paint; /* Prevent layout shifts during updates */
}

.comparison-table tr {
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    padding: 15px;
    text-align: center;
}

.comparison-table td {
    padding: 1rem;
    text-align: center;
}

.comparison-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: var(--secondary-color);
    cursor: pointer;
}

.comparison-table .broker-name {
    font-weight: 600;
    color: var(--primary-color);
}

.rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rating-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating .star {
    font-size: 14px;
    line-height: 1;
    color: #fbbf24;
}

.rating .star.full {
    color: #fbbf24;
}

.rating .star.half {
    color: #fbbf24;
}

.rating .star.empty {
    color: #e5e7eb;
}

.rating-count {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
}

.table-note {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: var(--secondary-color);
}

.features-section h2 {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
        "Roboto", sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Guide Section */
.guide-section {
    padding: 3rem 0;
}

.guide-section h2 {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
        "Roboto", sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.guide-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.guide-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 1rem;
        z-index: 1000;
        border-radius: 0 0 8px 8px;
    }

    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .nav-menu .nav-item {
        margin: 0.25rem 0;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        cursor: pointer;
    }

    .nav-menu .nav-item:hover {
        background-color: var(--secondary-color);
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        color: inherit;
    }

    .nav-menu .nav-item:hover a {
        color: var(--primary-color);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .calculator-inputs {
        grid-template-columns: 1fr;
    }

    .calculator {
        padding: 1.5rem;
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table td {
        padding: 0.5rem;
    }

    .btn-anbieter.modal-btn-anbieter {
        display: none;
    }

    .modal-link-container {
        display: grid !important;
    }
}

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

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .calculator {
        padding: 1rem;
    }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Broker Table Enhancements */
.broker-table {
    border-collapse: separate;
    border-spacing: 0 0.5rem; /* Vertical spacing between rows */
}

.broker-table th {
    font-weight: 600;
    color: #4b5563;
    text-align: left;
    padding: 0.75rem 1rem;
}

.broker-table tr {
    background-color: #ffffff;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.broker-table tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.broker-table td {
    padding: 1rem;
    vertical-align: middle;
}

.broker-table tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.broker-table tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
    width: 50px;
}

.broker-cell {
    text-align: center;
    padding: 0.75rem;
}

.broker-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

.broker-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;
}

.broker-logo {
    width: 100%;
    max-width: 120px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.country-flag {
    font-size: 0.8rem;
}

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

.fee-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1c1212;
    display: block;
}

.fee-label {
    font-size: 0.875rem;
    color: #6b7280;
}

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

.details-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.details-button:hover {
    background-color: #2563eb;
}

/* Modal Styling */
#details-modal {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 5dvh auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    height: 90dvh;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 0rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: var(--modal-header-height);
    box-sizing: border-box;
}

.broker-logo-modal {
    width: 60px;
    height: 60px;
    object-fit: contain;
}
.broker-rating {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.modal-title-container {
    flex: 1;
}

.modal-title-container h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #1f2937;
}

.modal-btn-anbieter {
    background: linear-gradient(135deg, #4661e5, #3a99ed);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.modal-btn-anbieter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: white;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem 2rem 2rem;
    position: relative;
}

/* Modal Scroll-Indikator */
.modal-scroll-wrapper {
    position: relative;
    height: 100%;
}

.modal-scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Oberer Modal Scroll-Indikator */
.modal-scroll-indicator-top {
    position: absolute;
    top: var(--modal-header-height);
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Zeige Modal Scroll-Indikator wenn scrollbar vorhanden und nicht am Ende */
.modal-body.scrollable ~ .modal-scroll-indicator {
    opacity: 1;
}

.modal-body.scrolled-to-end ~ .modal-scroll-indicator {
    opacity: 0;
}

/* Zeige oberen Modal Scroll-Indikator wenn gescrollt und nicht am Anfang */
.modal-body.scrolled ~ .modal-scroll-indicator-top {
    opacity: 1;
}

.modal-body.scrolled-to-start ~ .modal-scroll-indicator-top {
    opacity: 0;
}

.modal-link-container {
    padding: 1.5rem 0;
    display: none;
    justify-items: center;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section li {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

/* Special styling for transaction cost item */
.transaction-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.transaction-cost-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.transaction-cost-amount {
    font-weight: 600;
    color: #374151;
}

.transaction-cost-breakdown {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.tax-info li {
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
}

.flag-icon {
    width: 20px;
    height: auto;
}

.tax-status {
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
}

.tax-status.simple {
    background-color: #dcfce7;
    color: #166534;
}

.tax-status.not-simple {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Table cell styling for new structure */
.fee-detail {
    text-align: right;
    font-weight: 500;
    color: #374151;
}

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

.tax-cell .tax-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
}

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

.rating-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Tax countries styling */
.tax-countries {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.tax-country {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
}

.flag-mini {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Rating info styling */
.rating-main {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.rating-count {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.25rem;
}

.features-list li {
    justify-content: flex-start;
    padding: 0.4rem 0;
    color: #4b5563;
    gap: 0.5rem;
}

.features-list li::before {
    content: "✓";
    color: #22c55e;
    margin-right: 0.75rem;
    font-weight: bold;
}

.modal-details {
    text-align: center;
    padding-top: 1rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #4661e5, #3a99ed);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Account info styling */
.account-info {
    text-align: center;
    padding: 0.5rem;
}

.account-fee {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.interest-rate {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #6b7280;
    display: inline-block;
    width: fit-content;
}

/* Green styling for positive interest rates */
.interest-rate:not([data-no-interest]) {
    background-color: #dcfce7;
    color: #166534;
}

/* Hide legal content from search engines */
.no-index {
    user-select: none;
}

.no-index::before {
    content: "";
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Legal Pages Styles */
.legal-page {
    padding: 90px 0 20px;
    min-height: 100dvh;
    background-color: #f8fafc;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legal-content h1 {
    color: #3a3f45;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-size: 1.7rem;
    font-weight: 600;
}

.legal-content h2 {
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.legal-content h3 {
    color: #4b5563;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.legal-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #374151;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-section {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 100px 0 40px;
    }

    .legal-content {
        padding: 1.5rem;
    }

    .legal-content h1 {
        font-size: 1.4rem;
    }

    .legal-content h2 {
        font-size: 1.25rem;
    }

    .nav-menu {
        gap: 0rem;
    }
}

/* Cookie Popup Styles */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    z-index: 10000;
    padding: 1.5rem;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 -12px 32px -8px rgba(0, 0, 0, 0.08),
        0 -6px 16px -4px rgba(0, 0, 0, 0.04), 0 -1px 3px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-popup-show {
    transform: translateY(0) !important;
}

.cookie-popup-hide {
    transform: translateY(100%) !important;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    color: #4b5563;
}

.cookie-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.cookie-text p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.85;
    margin: 0;
    max-width: 600px;
    color: #6b7280;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    background: rgba(79, 70, 229, 0.05);
}

.cookie-link:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(79, 70, 229, 0.2);
}

.cookie-accept-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px -2px rgba(52, 96, 191, 0.3),
        0 2px 4px -1px rgba(52, 96, 191, 0.2);
}

.cookie-accept-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -2px rgba(16, 185, 129, 0.4),
        0 4px 8px -2px rgba(16, 185, 129, 0.3);
}

.cookie-accept-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-popup {
        padding: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-text h4 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
        max-width: none;
    }

    .cookie-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-link,
    .cookie-accept-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-link,
    .cookie-accept-btn {
        width: 100%;
    }
}
