/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f8f9fa;
}

/* Main Container */
.container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .container {
    background-color: #2c2c2e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header */
h1 {
    text-align: center;
    color: #333;
    font-weight: 700;
    margin-bottom: 30px;
}

body.dark-mode h1 {
    color: #ffffff;
}

/* Converter Section */
.converter {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

body.dark-mode label {
    color: #a0a0a0;
}

input, select {
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f8f9fa;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

body.dark-mode input, body.dark-mode select {
    background-color: #3a3a3c;
    color: #f8f9fa;
    border-color: #555;
}

body.dark-mode input:focus, body.dark-mode select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Swap Button */
.swap-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

#swap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

#swap:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#swap:active {
    transform: translateY(0);
}

/* Result Display */
.result {
    margin-top: 30px;
    padding: 20px;
    background-color: #e9f5ff;
    border-radius: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    color: #0056b3;
}

body.dark-mode .result {
    background-color: #003f7f;
    color: #e9f5ff;
}

/* Dark Mode Toggle */
#dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    background-color: #343a40;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode #dark-mode-toggle {
    background-color: #f8f9fa;
    color: #343a40;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        margin: 20px;
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }
}

/* Articles Section */
#articles-section {
    margin-top: 60px;
    border-top: 1px solid #e9ecef;
    padding-top: 40px;
}

body.dark-mode #articles-section {
    border-top-color: #3a3a3c;
}

#articles-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.dark-mode .card {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.dark-mode .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

body.dark-mode .card h2 {
    color: #ffffff;
}

.card p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

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

body.dark-mode .card p {
    color: #c0c0c0;
}

/* Header & Navigation */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.dark-mode .main-header {
    background-color: #2c2c2e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.main-nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.main-nav .logo {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

body.dark-mode .main-nav a {
    color: #f0f0f0;
}

.main-nav a:hover, .main-nav a.active {
    color: #007bff;
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
}

body.dark-mode .main-footer {
    background-color: #2c2c2e;
    border-top-color: #3a3a3c;
}

.main-footer p {
    margin: 0 0 10px;
}

.main-footer nav a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

body.dark-mode .main-footer nav a {
    color: #a0a0a0;
}

.main-footer nav a:hover {
    color: #007bff;
}


/* Page-specific containers */
.page-container {
    margin-top: 100px;
    margin-bottom: 100px;
}

.page-content p {
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Article Snippets & Buttons */
.card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}
body.dark-mode .card h3 {
    color: #ffffff;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

.view-all-articles {
    text-align: center;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0056b3;
}

.article-meta {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}
body.dark-mode .article-meta {
    color: #a0a0a0;
}

/* Popular Pairs */
.popular-pairs {
    margin-top: 25px;
    text-align: center;
}
.popular-pairs h4 {
    margin: 0 10px 10px 0;
    font-size: 14px;
    color: #6c757d;
    display: inline-block;
    font-weight: 500;
}
body.dark-mode .popular-pairs h4 {
    color: #a0a0a0;
}
.popular-pairs .pair {
    display: inline-block;
    margin: 0 5px 10px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: #e9ecef;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}
body.dark-mode .popular-pairs .pair {
    background-color: #3a3a3c;
    color: #f0f0f0;
}
.popular-pairs .pair:hover {
    background-color: #d1d5db;
}
body.dark-mode .popular-pairs .pair:hover {
    background-color: #555;
}

/* Clickable Card */
.clickable-card {
    cursor: pointer;
}

/* Article Image */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
    margin: -30px -30px 25px -30px;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: -150px; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: #2c2c2e;
    color: #f8f9fa;
    padding: 20px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 1001;
    transition: bottom 0.5s ease-in-out;
}
.cookie-banner.show {
    bottom: 0;
}
.cookie-banner p {
    margin: 0;
    font-size: 15px;
}
.cookie-banner a {
    color: #0095ff;
    text-decoration: none;
}
.cookie-banner a:hover {
    text-decoration: underline;
}
