* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: url('../img/background/monitor.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 247, 250, 0.1);
    z-index: -1;
}

.navbar {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.35), rgba(52, 73, 94, 0.9));
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar-menu {
    display: flex;
    gap: 2.5rem;
}

.navbar-item {
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.navbar-item:hover {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.navbar-item.active {
    color: #3498db;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.account-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 2rem;
    height: fit-content;
    border: 1px solid rgba(255,255,255,0.9);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    color: #2c3e50;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(240, 244, 248, 0.8);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card-title::before {
    content: "";
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 2px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(248, 249, 250, 0.7);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.5);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: rgba(248, 249, 250, 0.9);
}

.info-label {
    font-size: 1rem;
    color: #475569;
    font-weight: 500;
}

.info-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
}

.balance-value {
    color: #27ae60;
    font-size: 1.25rem;
}

.profit-positive {
    color: #27ae60;
}

.profit-negative {
    color: #e74c3c;
}

.position-direction {
    text-transform: uppercase;
    font-weight: 700;
}

.order-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 2.5rem;
    border: 1px solid rgba(255,255,255,0.9);
}

.order-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: #2c3e50;
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
}

.order-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 3px;
}

.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #475569;
    font-size: 1rem;
}

input, select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(250, 251, 252, 0.7);
    color: #2c3e50;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

button {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(52, 152, 219, 0.3);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.result {
    margin-top: 1.8rem;
    padding: 1.2rem;
    border-radius: 12px;
    display: none;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.5);
}

.success {
    background: rgba(232, 245, 233, 0.8);
    color: #2e7d32;
    display: block;
    border-color: rgba(200, 230, 201, 0.8);
}

.error {
    background: rgba(255, 235, 238, 0.8);
    color: #c62828;
    display: block;
    border-color: rgba(255, 205, 210, 0.8);
}

.loading {
    text-align: center;
    color: #475569;
    padding: 1rem;
    font-size: 1rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: translateY(-10px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.9);
}

.modal-overlay.show .modal-box {
    transform: translateY(0);
}

.modal-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.modal-success .modal-icon {
    color: #27ae60;
}

.modal-error .modal-icon {
    color: #e74c3c;
}

.modal-text {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .navbar-menu {
        gap: 1.5rem;
    }

    .navbar {
        padding: 1rem 1.5rem;
    }

    .account-card, .order-card {
        padding: 1.5rem;
    }

    .order-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .navbar-logo {
        font-size: 1.4rem;
    }

    .navbar-menu {
        gap: 1rem;
    }

    .navbar-item {
        font-size: 0.95rem;
    }

    .info-item {
        padding: 0.8rem 1rem;
    }

    .info-label {
        font-size: 0.9rem;
    }

    .info-value {
        font-size: 1rem;
    }
}

/* 一键平仓按钮 */
.close-all-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.close-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

.close-all-btn:active {
    transform: translateY(0);
}

.close-all-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}