/* ============================================
   CSS Variables & Base Styles
   ============================================ */

:root {
    --primary-green: #00FF88;
    --primary-green-dark: #00AA55;
    --bg-primary: #0A0E1A;
    --bg-secondary: #111827;
    --bg-tertiary: #1F2937;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --border-color: #374151;
    --shadow-green: 0 0 20px rgba(0, 255, 136, 0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --header-h: 80px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ============================================
   Header / Navigation
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: auto;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: 8px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--bg-secondary);
    color: var(--primary-green);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-h);
    padding-bottom: 20px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-bg-animation {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 70%);
    animation: bgFloat 20s ease-in-out infinite;
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 30s linear infinite;
    opacity: 0.5;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.2) 0%, transparent 70%);
    animation: glowPulse 8s ease-in-out infinite;
    filter: blur(60px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    padding: 1rem;
    animation: fadeInUp 1s ease;
    height: 100%;
    gap: 1rem;
}

.hero-card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 136, 0.1) inset,
        0 0 60px rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100svh - 120px);
    max-height: calc(100vh - 120px);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 136, 0.5) 50%, 
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

.hero-banner-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.hero-banner-img {
    max-width: 100%;
    max-height: 45vh;
    max-height: 45svh;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    image-rendering: auto;
    border-radius: 12px;
}

.hero-card-content {
    text-align: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero-cta {
    margin-bottom: 0;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: var(--bg-primary);
    box-shadow: var(--shadow-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.scroll-indicator {
    color: var(--primary-green);
    animation: bounce 2s infinite;
    cursor: pointer;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.scroll-indicator:hover {
    color: var(--primary-green-dark);
    transform: translateY(5px);
}

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: 5rem 0;
    position: relative;
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ============================================
   Exchange Page Styles
   ============================================ */

.reasons-section {
    background: var(--bg-primary);
    padding: 5rem 0;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 150px;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    line-height: 1;
}

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

.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    transform: translateX(-100%);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: var(--shadow-green);
}

.feature-card:hover::before {
    transform: translateX(0);
}

.feature-icon {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

@media (max-width: 768px) {
    .stats-row {
        gap: 2rem;
        margin: 2rem 0 3rem;
    }
    
    .stat-item {
        min-width: 120px;
    }
    
    .feature-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
}

/* ============================================
   Live Market Section
   ============================================ */

.market-section {
    background: var(--bg-secondary);
}

.market-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary-green);
    color: var(--bg-primary);
    border-color: var(--primary-green);
    box-shadow: var(--shadow-green);
}

.tradingview-container {
    width: 100%;
    min-height: 500px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.tradingview-widget-container {
    width: 100%;
    height: 100%;
}

/* ============================================
   Value Proposition Section
   ============================================ */

.value-prop-section {
    background: var(--bg-primary);
}

.value-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    transform: translateX(-100%);
    transition: var(--transition-normal);
}

.value-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: var(--shadow-green);
}

.value-card:hover::before {
    transform: translateX(0);
}

.value-icon {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.value-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* ============================================
   Explanation Section
   ============================================ */

.explanation-section {
    background: var(--bg-secondary);
}

.explanation-content {
    max-width: 900px;
    margin: 0 auto;
}

.explanation-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.explanation-text h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.example-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.example-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.price {
    color: var(--primary-green);
    font-size: 1.25rem;
    font-weight: 600;
}

.example-arrow {
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: bold;
}

.example-profit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: auto;
}

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

.profit-value {
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: 700;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
    padding-left: 0;
}

.features-list li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.8;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* ============================================
   Participation Form Section
   ============================================ */

.form-section {
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

.form-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="%2300FF88" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(10, 14, 26, 0.9));
    z-index: 1;
    pointer-events: none;
}

.form-section .container {
    position: relative;
    z-index: 2;
}

.participation-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
}

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

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

.form-group label {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

/* Ensure native selects are always clickable and above decorative layers */
select {
    pointer-events: auto !important;
    position: relative;
    z-index: 30;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.file-upload-label:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.checkbox-label a {
    color: var(--primary-green);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.125rem;
    font-size: 1.05rem;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    min-height: 1.25rem;
    display: block;
}

/* ============================================
   News Section
   ============================================ */

.news-section {
    background: var(--bg-secondary);
}

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

.news-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: var(--shadow-green);
}

.news-image {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-placeholder {
    font-size: 4rem;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.news-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.news-link:hover {
    text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

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

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
    image-rendering: auto;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.company-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.registration {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.registry-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.registry-link:hover {
    text-decoration: underline;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
}

.partner-logo {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.partner-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
    opacity: 0.95;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

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

.legal-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-green);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    color: var(--primary-green);
    transition: var(--transition-fast);
}

.back-to-top:hover svg {
    color: var(--bg-primary);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   Exchange Form Section
   ============================================ */

/* Remove all backgrounds/borders from wrappers - section background handled by pseudo-element */
#exchange-form,
.exchange-form-wrapper {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.exchange-form-section {
    position: relative;
    width: 100%;
    padding: clamp(56px, 7vw, 110px) 0;
    overflow: visible;
}

.exchange-form-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1200px 520px at 50% 25%, rgba(46,255,134,.18), transparent 60%),
        radial-gradient(900px 450px at 70% 10%, rgba(46,255,134,.10), transparent 62%),
        linear-gradient(180deg, rgba(10,14,24,0), rgba(10,14,24,.55));
}

.exchange-form-section > * {
    position: relative;
    z-index: 1;
}

.exchange-form-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Keep the swap-center centered for the form card */
.exchange-form .swap-center {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 30px 16px 40px;
    display: flex;
    justify-content: center;
}

/* Make logo carousel full width */
.exchange-form [id^="logo-carousel"] {
    width: 100% !important;
    max-width: none !important;
}

.exchange-form {
    width: 100%;
    position: relative;
    z-index: 1;
}

.exchange-form .swap-center,
.exchange-form .card,
.exchange-form form {
    position: relative;
    z-index: 1;
}

.exchange-form .cselect,
.exchange-form .csel-trigger {
    position: relative;
    z-index: auto;
}

.exchange-form[hidden] {
    display: none !important;
}

/* Defensive: ensure any potential overlay background layers never block interaction */
.background-gradient,
.blur-layer,
.glow-layer,
.hero-overlay {
    pointer-events: none !important;
}

/* Defensive: ensure swap/exchange containers stay above background layers */
.exchange-container,
.swap-form {
    position: relative;
    z-index: 20;
}

/* ============================================
   Animations
   ============================================ */

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

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

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

@keyframes bgFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(2deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

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

@keyframes glowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: var(--transition-normal);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .example-box {
        flex-direction: column;
        text-align: center;
    }
    
    .example-profit {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .hero-card {
        padding: 1.25rem;
        max-width: 95%;
    }
    
    .hero-banner-container {
        margin-bottom: 0.75rem;
    }
    
    .hero-banner-img {
        max-height: 40vh;
        max-height: 40svh;
    }
    
    .hero-title {
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 0.75rem;
        font-size: clamp(0.8rem, 2vw, 0.95rem);
    }
    
    section {
        padding: 3rem 0;
    }
    
    .participation-form {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .value-cards {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-logo-img {
        height: 40px;
    }
}

@media (max-width: 520px) {
    .partner-logo-img {
        height: 34px;
    }
}

/* Elfsight RSS News Feed */
.krypto-news-feed {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Policy Pages (Legal, Privacy, Terms)
   ============================================ */

.policy-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding-top: var(--header-h);
}

.policy-hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
}

.policy-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.policy-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    text-align: center;
    font-weight: 400;
}

.policy-content {
    padding-bottom: 4rem;
}

.policy-meta {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.policy-toc {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.policy-toc h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.policy-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-toc li {
    margin-bottom: 0.75rem;
}

.policy-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
}

.policy-toc a:hover {
    color: var(--primary-green);
    padding-left: 0.5rem;
}

.policy-body {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.policy-body h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.policy-body h2:first-child {
    margin-top: 0;
}

.policy-body h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.policy-body ul,
.policy-body ol {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    line-height: 1.8;
}

.policy-body li {
    margin-bottom: 0.75rem;
}

.policy-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-block {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-green);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.info-block p {
    margin-bottom: 1rem;
}

.info-block p:last-child {
    margin-bottom: 0;
}

.policy-link {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition-fast);
    word-break: break-all;
}

.policy-link:hover {
    color: var(--primary-green-dark);
    text-decoration: underline;
}

.policy-note {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.policy-note p {
    margin-bottom: 0;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .policy-hero {
        padding: 3rem 0 2rem;
        margin-bottom: 2rem;
    }
    
    .policy-toc {
        padding: 1.5rem;
    }
    
    .policy-body {
        padding: 0 1rem;
    }
    
    .policy-body h2 {
        margin-top: 2rem;
        font-size: 1.5rem;
    }
    
    .policy-body h3 {
        font-size: 1.25rem;
    }
    
    .info-block {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 28px;
    }
    
    .hero-card {
        padding: 1rem;
        border-radius: 16px;
        max-height: calc(100svh - 100px);
        max-height: calc(100vh - 100px);
    }
    
    .hero-banner-container {
        margin-bottom: 0.5rem;
    }
    
    .hero-banner-img {
        max-height: 35vh;
        max-height: 35svh;
    }
    
    .hero-title {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: clamp(0.75rem, 2vw, 0.9rem);
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }
    
    .hero-content {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .scroll-indicator {
        margin-top: 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .market-tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .footer-logo-img {
        height: 32px;
    }
}

