:root {
    --background: #121212;
    --text-primary: #EAEAEA;
    --text-secondary: #B3B3B3;
    --accent: #00E676;
    --accent-dark: #00C853;
    --accent-blue: #3772FF;
    --surface: #1E1E1E;
    --border: #2E2E2E;
    --warning: #ff9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 4rem 0;
}

/* Aurora Background */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.aurora-background::before, 
.aurora-background::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(100px);
    animation: aurora-flow 15s infinite linear;
}

.aurora-background::before {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -20%;
    left: -20%;
}

.aurora-background::after {
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    bottom: -20%;
    right: -20%;
    animation-delay: -7.5s;
}

@keyframes aurora-flow {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    25% { transform: translateX(50px) translateY(30px) scale(1.1); }
    50% { transform: translateX(0) translateY(-50px) scale(1); }
    75% { transform: translateX(-50px) translateY(30px) scale(0.9); }
}

/* Main Layout */
.main-container {
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    z-index: 1;
}

header h2 {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

main h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

main p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Exchange Section */
#exchange-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exchange-item {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.exchange-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.1);
}

.exchange-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    gap: 1rem;
}

.exchange-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.file-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    white-space: nowrap;
    display: block; /* Make it a block element */
    margin: 0.25rem auto 2rem auto; /* Top, Right, Bottom, Left margins */
    width: fit-content; /* To center it if it's a block */
}

.file-found .file-status {
    color: var(--accent);
    background: rgba(0, 230, 118, 0.1);
}

.file-fallback .file-status {
    color: var(--warning);
    background: rgba(255, 152, 0, 0.1);
}

.exchange-description {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-align: center;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.exchange-description.changes-message {
    color: var(--accent);
    font-weight: 600;
    background: rgba(0, 230, 118, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

/* Market Tabs */
.market-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.market-tab-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.market-tab-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.market-tab-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.market-contents {
    position: relative;
}

.market-content {
    display: none;
}

.market-content.active {
    display: block;
}

/* Single Row Layout */
.single-row-content {
    text-align: center;
}

.single-row-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.single-row-buttons .btn {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem; /* Added back */
    margin-top: 1.5rem; /* Kept */
    margin-bottom: 1rem; /* Add space below buttons */
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
    transform: translateY(-1px);
}

/* Import Instructions */
.import-instructions {
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.import-instructions h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.import-instructions p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.import-instructions p strong {
    color: var(--accent);
    font-weight: 600;
    display: inline;
    margin-top: 0;
}

.import-instructions p strong:first-child {
    margin-top: 0;
}

/* Footer */
footer {
    position: absolute;
    bottom: 1rem;
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }
    
    .import-instructions {
        margin-top: 2rem;
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .import-instructions h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .import-instructions p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

@media (max-width: 768px) {
    .single-row-buttons .btn {
        min-width: 100px;
        max-width: 160px;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 600px) {
    .button-group {
        flex-direction: column;
    }
    
    .single-row-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .single-row-buttons .btn {
        flex: none;
        min-width: unset;
        max-width: unset;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        white-space: normal;
        text-overflow: unset;
        overflow: unset;
        word-wrap: break-word;
    }
    
    .exchange-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .exchange-header h3 {
        white-space: normal;
    }
    
    .market-tabs {
        width: 100%;
        justify-content: flex-start;
    }
    
    .file-status {
        margin-left: 0;
        font-size: 0.8rem;
        white-space: normal;
        text-align: center;
    }
    
    .exchange-description {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 2rem 0;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .import-instructions {
        padding: 1.5rem;
    }
    
    .exchange-item {
        padding: 1.25rem;
    }
    
    .single-row-buttons .btn {
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem;
    }
    
    .exchange-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .file-status {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}