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

:root {
    --bitcoin-orange: #f6d86f;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-section: #f5f6f7;
    --text-dark: #1a1a1a;
    --text-gray: #6c757d;
    --border-light: #e0e0e0;
    --border-medium: #d1d1d1;
    --success-green: #10b981;
    --error-red: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Navigation */
.navbar {
    background: var(--bg-white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.logo img {
    filter: drop-shadow(0 2px 4px rgba(247, 147, 26, 0.3));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--bitcoin-orange);
}

.language-selector select {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-medium);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: var(--bitcoin-orange);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--bitcoin-orange);
}

/* Hero Section */
.hero {
    padding: 60px 0;
    text-align: center;
    background: var(--bg-white);
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.welcome-message {
    font-size: 36px;
    font-weight: 600;
    color: var(--bitcoin-orange);
    margin: 30px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.cta-button {
    background: var(--bitcoin-orange);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cta-button:hover {
    background: #e08915;
}

.username-input-container {
    margin-top: 25px;
    display: inline-flex;
    align-items: center;
    background: var(--bg-white);
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    padding: 2px;
    transition: all 0.3s ease;
}

.username-input-container:focus-within {
    border-color: var(--bitcoin-orange);
}

.username-input {
    background: transparent;
    border: none;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
    min-width: 180px;
}

.domain {
    padding: 10px 14px;
    color: var(--text-gray);
    font-size: 15px;
}

/* Features Section */
.features,
.additional-features {
    padding: 60px 0;
    background: var(--bg-light);
}

.additional-features {
    background: var(--bg-white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 35px 25px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--bitcoin-orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.features {
    text-align: center;
}

/* Blockchain Explorer Section */
.blockchain-explorer {
    padding: 60px 0;
    background: var(--bg-section);
    border-top: 1px solid var(--border-light);
}

.blockchain-explorer h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    text-transform: uppercase;
}

.price-section {
    text-align: center;
    margin-bottom: 50px;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.price-label {
    font-size: 12px;
    color: var(--text-gray);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.price-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--bitcoin-orange);
}

.price-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}

.buy-button,
.sell-button {
    padding: 12px 32px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.buy-button {
    background: var(--success-green);
    color: white;
}

.buy-button:hover {
    background: #0ea876;
}

.sell-button {
    background: var(--error-red);
    color: white;
}

.sell-button:hover {
    background: #dc2626;
}

.powered-by {
    font-size: 11px;
    color: var(--text-gray);
    font-style: italic;
}

.data-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.data-table {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 400px;
    /* Fixed height for all tables */
}

.data-table h3 {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-y: auto;
    /* Enable vertical scrolling */
    max-height: 320px;
    /* Leave room for header */
}

.data-table table::-webkit-scrollbar {
    width: 8px;
}

.data-table table::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.data-table table::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.data-table table::-webkit-scrollbar-thumb:hover {
    background: var(--bitcoin-orange);
}

.data-table thead {
    border-bottom: 2px solid var(--border-light);
    display: table;
    width: 100%;
    table-layout: fixed;
}

.data-table tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.data-table th {
    text-align: center;
    padding: 10px 8px;
    font-size: 11px;
    color: var(--text-gray);
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.data-table td {
    padding: 12px 8px;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

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

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

/* Currency table specific styles */
.currency-table {
    height: 400px;
}

.currency-table table {
    max-height: 320px;
}

.currency-flag {
    font-size: 18px;
    margin-right: 8px;
    display: inline-block;
}

.currency-code {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 12px;
}

.currency-price {
    font-weight: 600;
    color: var(--bitcoin-orange);
    text-align: right !important;
}

.status {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.confirmed {
    background: #d1fae5;
    color: #065f46;
}

/* Auth Modals */
.auth-modal {
    max-width: 450px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.form-group input {
    padding: 12px 15px;
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--bitcoin-orange);
}

.form-group small {
    font-size: 12px;
    color: var(--text-gray);
}

.form-group small span {
    color: var(--bitcoin-orange);
    font-weight: 600;
}

.auth-button {
    background: var(--bitcoin-orange);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-button:hover {
    background: #e08416;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

.auth-switch a {
    color: var(--bitcoin-orange);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 50px 0 25px;
    border-top: 1px solid var(--border-light);
}

.footer-logo {
    text-align: center;
    margin-bottom: 25px;
}

.footer-logo img {
    filter: drop-shadow(0 2px 4px rgba(247, 147, 26, 0.3));
}

.disclaimer {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 25px;
}

.disclaimer p {
    font-size: 11px;
    color: var(--text-gray);
    line-height: 1.7;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--bitcoin-orange);
}

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.copyright p {
    color: var(--text-gray);
    font-size: 12px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-white);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close {
    color: var(--text-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: var(--bitcoin-orange);
}

.modal-content h2 {
    color: var(--text-dark);
    margin-bottom: 25px;
    font-size: 24px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 12px;
    font-weight: 700;
}

.details-content {
    color: var(--text-dark);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-gray);
    min-width: 150px;
    margin-bottom: 5px;
    font-size: 13px;
}

.detail-value {
    color: var(--text-dark);
    word-break: break-all;
    flex: 1;
    text-align: right;
    font-size: 13px;
}

.detail-value.hash {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: 3px;
}

.tx-list {
    margin-top: 20px;
}

.tx-item {
    background: var(--bg-light);
    padding: 12px;
    margin: 8px 0;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.tx-item:hover {
    border-color: var(--bitcoin-orange);
}

.tx-hash {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--bitcoin-orange);
    word-break: break-all;
    cursor: pointer;
}

.tx-hash:hover {
    text-decoration: underline;
}

/* Clickable items */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    background: var(--bg-light);
}

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

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

.loading-container {
    text-align: center;
    padding: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
    }

    .nav-link {
        font-size: 11px;
    }

    .hero-title {
        font-size: 28px;
    }

    .price-value {
        font-size: 36px;
    }

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

    .data-tables {
        grid-template-columns: 1fr;
    }

    .price-actions {
        flex-direction: column;
        width: 100%;
    }

    .buy-button,
    .sell-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }

    .hero-title {
        font-size: 22px;
    }

    .cta-button {
        padding: 12px 28px;
        font-size: 12px;
    }

    .username-input-container {
        flex-direction: column;
        width: 100%;
    }

    .username-input {
        width: 100%;
    }
}

html {
    scroll-behavior: smooth;
}