/* General Body and Layout */
:root {
    --primary-color: #4CAF50; /* Green */
    --secondary-color: #2196F3; /* Blue */
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --info-color: #ff9800; /* Orange for Awaiting Deposit */
    --header-bg: #2c3e50; /* Dark blue/grey for header */
    --footer-bg: #34495e; /* Slightly darker for footer */
    --link-color: #3498db; /* Blue for links */
    --light-text: #ecf0f1; /* Light text for dark backgrounds */
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Full viewport height */
}

/* Header */
.header {
    background-color: var(--header-bg);
    color: var(--light-text);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .logo-container {
    display: flex;
    align-items: center;
}

.header .logo {
    height: 40px; /* Adjust as needed */
    margin-right: 15px;
}

.header .site-name {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--light-text);
    text-decoration: none; /* Remove underline from link */
}

.header .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.header .nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 400;
    font-size: 1.05em;
    transition: color 0.3s ease;
}

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

/* Main Content Area */
.main-content {
    flex: 1; /* Allows main content to grow and push footer down */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top, not center vertically */
    padding: 40px 20px; /* Add padding around the converter box */
    box-sizing: border-box;
}

.container {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 35px 45px;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 2em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
    width: calc(100% - 20px);
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.currency-select-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.currency-select-group > div {
    flex: 1;
    min-width: 48%;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.result-box {
    background-color: #e8f5e9;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    font-size: 1.05em;
    line-height: 1.6;
    display: none;
}

.result-box p {
    margin: 5px 0;
}

.result-box strong {
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    background-color: #ffebee;
    border: 1px solid var(--error-color);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.success-message {
    color: var(--success-color);
    background-color: #e8f5e9;
    border: 1px solid var(--success-color);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: none;
    margin: 15px auto;
}

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

/* Order Details Section */
#orderDetails {
    background-color: #e3f2fd;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    font-size: 1.05em;
    line-height: 1.6;
    display: none;
}

#orderDetails strong {
    color: var(--secondary-color);
}

#orderDetails .copy-button {
    background-color: #03a9f4;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

#orderDetails .copy-button:hover {
    background-color: #0288d1;
}

.tag-input-group {
    display: none;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.status-awaiting-deposit { background-color: var(--info-color); }
.status-confirming-deposit { background-color: var(--info-color); }
.status-exchanging { background-color: var(--secondary-color); }
.status-sending { background-color: var(--secondary-color); }
.status-complete { background-color: var(--success-color); }
.status-refund { background-color: var(--error-color); }
.status-failed { background-color: var(--error-color); }
.status-action-request { background-color: var(--info-color); }
.status-request-overdue { background-color: var(--error-color); }

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: 20px 30px;
    text-align: center;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer-links {
    list-style: none;
    margin: 0 0 10px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    .header .nav-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .container {
        padding: 25px 30px;
    }
    .currency-select-group {
        flex-direction: column;
        gap: 0;
    }
    .currency-select-group > div {
        min-width: 100%;
    }
}
