:root {
    --primary: #00df9a;
    --primary-dark: #00b377;
    --dark: #000300;
    --gray-800: #1a1a1a;
    --gray-700: #2a2a2a;
    --nav-height: 5rem;
}

@media (min-width: 768px) {
    :root {
        --nav-height: 6rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: white;
}

.bg-dark {
    background-color: var(--dark) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-gradient {
    background: linear-gradient(to right, rgba(0, 223, 154, 0.2), rgba(0, 0, 0, 0));
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-gradient {
    transition: all 0.3s ease;
}

.hover-gradient:hover {
    background: linear-gradient(to right, var(--primary), var(--primary-dark)) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 223, 154, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile menu animation */
#mobile-menu {
    transition: left 0.5s ease-in-out;
}

#mobile-menu.open {
    left: 0 !important;
}

/* Form styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 223, 154, 0.2);
}

/* Button animations */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Layout */
.site-header {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 3, 0, 0.95);
}

.page-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
    .page-container {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .page-container {
        padding: 2rem 2rem;
    }
}

.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0 3rem;
    min-height: calc(100svh - var(--nav-height));
}

.auth-shell {
    min-height: calc(100svh - var(--nav-height));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 1rem 2.5rem;
    background:
        radial-gradient(ellipse at top, rgba(0, 223, 154, 0.08) 0%, transparent 55%),
        var(--dark);
}

@media (min-width: 768px) {
    .auth-shell {
        align-items: center;
        padding: 2rem 1rem;
    }
}

.auth-layout {
    width: 100%;
    max-width: 56rem;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 223, 154, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

@media (min-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr 1.1fr;
        min-height: 32rem;
    }
}

.auth-brand {
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(0, 223, 154, 0.18) 0%, rgba(0, 3, 0, 0.95) 55%);
    border-right: 1px solid rgba(0, 223, 154, 0.12);
}

@media (min-width: 1024px) {
    .auth-brand {
        display: flex;
    }
}

.auth-brand-logo {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.auth-brand h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.auth-brand p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.auth-brand-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-brand-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #d1d5db;
    font-size: 0.95rem;
}

.auth-brand-list i {
    color: var(--primary);
    width: 1rem;
    text-align: center;
}

.auth-panel {
    background: #111827;
    padding: 1.75rem 1.5rem;
}

@media (min-width: 640px) {
    .auth-panel {
        padding: 2rem 2.25rem;
    }
}

.auth-panel-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

@media (min-width: 1024px) {
    .auth-panel-header {
        text-align: left;
    }
}

.auth-panel-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 223, 154, 0.12);
    color: var(--primary);
    font-size: 1.25rem;
}

@media (min-width: 1024px) {
    .auth-panel-icon {
        margin-left: 0;
        margin-right: 0;
    }
}

.auth-panel-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.auth-panel-header p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.auth-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid #374151;
    background: #0f1419;
    color: #f3f4f6;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #6b7280;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 223, 154, 0.15);
}

.auth-phone-group {
    display: flex;
}

.auth-phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    border: 1px solid #374151;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
    background: #1a222d;
    color: #9ca3af;
    font-size: 0.9rem;
    white-space: nowrap;
}

.auth-phone-group .auth-input {
    border-radius: 0 0.5rem 0.5rem 0;
}

.auth-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .auth-row-2 {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .auth-row-2 .auth-field {
        margin-bottom: 1.1rem;
    }
}

.auth-remember-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-top: 0.65rem;
}

.auth-remember-row label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

.auth-remember-row a {
    color: var(--primary);
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-remember-row a:hover {
    color: #fff;
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit:hover {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 223, 154, 0.35);
}

.auth-footer-text {
    text-align: center;
    margin-top: 1.25rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.auth-footer-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-text a:hover {
    color: #fff;
}

.password-toggle-wrap .auth-input {
    padding-right: 2.75rem;
}

.nav-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.nav-tabs-scroll nav {
    display: flex;
    min-width: max-content;
    gap: 1.5rem;
}

.nav-tabs-scroll .tab-btn {
    white-space: nowrap;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .nav-tabs-scroll .tab-btn {
        font-size: 1rem;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.error-page-icon {
    font-size: 4rem;
}

.error-page-code {
    font-size: 4rem;
    line-height: 1;
}

@media (min-width: 640px) {
    .error-page-icon {
        font-size: 6rem;
    }

    .error-page-code {
        font-size: 6rem;
    }
}

@media (min-width: 768px) {
    .error-page-icon {
        font-size: 8rem;
    }

    .error-page-code {
        font-size: 8rem;
    }
}

/* Chart container */
#tradingChart {
    background: var(--gray-800);
    border-radius: 8px;
}

/* Modal styles */
.modal {
    backdrop-filter: blur(4px);
}

/* Table styles */
table {
    border-collapse: collapse;
}

th, td {
    border-bottom: 1px solid #374151;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Status badges */
.status-pending {
    background-color: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.status-completed {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap input {
    padding-right: 2.75rem;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle-btn:hover {
    color: #ffffff;
}

.password-toggle-btn .hidden {
    display: none;
}