/* Trading Interface Styles */
.trading-container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

.trading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.trading-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: #00ff00;
    font-weight: 500;
}

/* Trading Layout */
.trading-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Panel Styling */
.order-panel,
.market-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 12px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 206, 209, 0.1);
}

.panel-header h3 {
    color: var(--color-dark-turquoise);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Order Form */
.order-form {
    padding: 2rem;
}

.order-form .form-group {
    margin-bottom: 1.5rem;
}

.order-form .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.order-form input[type="text"],
.order-form input[type="number"],
.order-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.order-form input[type="text"]:focus,
.order-form input[type="number"]:focus,
.order-form select:focus {
    outline: none;
    border-color: var(--color-dark-turquoise);
    background: rgba(0, 206, 209, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.1);
}

.order-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.symbol-input-container {
    display: flex;
    gap: 0.5rem;
}

.symbol-input-container input {
    flex: 1;
}

.btn-quote {
    padding: 0.875rem 1.5rem;
    background: rgba(0, 206, 209, 0.1);
    border: 1px solid rgba(0, 206, 209, 0.3);
    border-radius: 8px;
    color: var(--color-dark-turquoise);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-quote:hover {
    background: rgba(0, 206, 209, 0.15);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:hover {
    background: rgba(0, 206, 209, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Quote Display */
.quote-display {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(0, 206, 209, 0.03);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 8px;
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quote-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark-turquoise);
}

.quote-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.quote-change {
    font-size: 1rem;
    font-weight: 500;
}

.quote-change.positive {
    color: #00ff00;
}

.quote-change.negative {
    color: #ff6b6b;
}

.quote-details {
    display: flex;
    gap: 2rem;
}

.quote-details .detail {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.quote-details .detail span {
    color: #ffffff;
    font-weight: 500;
}

/* Order Type Tabs */
.order-type-tabs {
    display: flex;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--color-dark-turquoise);
    color: #000000;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

/* Order Summary */
.order-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.order-summary h4 {
    color: var(--color-dark-turquoise);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-line:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--color-dark-turquoise);
}

.summary-line span:first-child {
    color: rgba(255, 255, 255, 0.6);
}

.summary-line span:last-child {
    color: #ffffff;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.order-actions button {
    flex: 1;
}

.btn-primary.buy {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
}

.btn-primary.sell {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: #ffffff;
}

/* Order Status */
.order-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.order-status.info {
    background: rgba(0, 206, 209, 0.1);
    border: 1px solid rgba(0, 206, 209, 0.3);
    color: var(--color-dark-turquoise);
}

.order-status.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

.order-status.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
}

/* Market Panel */
.market-panel {
    height: fit-content;
}

/* Watchlist */
.watchlist-container {
    max-height: 400px;
    overflow-y: auto;
}

.watchlist-items {
    padding: 0;
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.watchlist-item:hover {
    background: rgba(0, 206, 209, 0.05);
}

.watchlist-item:last-child {
    border-bottom: none;
}

.watchlist-symbol {
    font-weight: 600;
    color: var(--color-dark-turquoise);
}

.watchlist-price {
    color: #ffffff;
    font-weight: 500;
}

.watchlist-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.watchlist-change.positive {
    color: #00ff00;
}

.watchlist-change.negative {
    color: #ff6b6b;
}

/* Recent Orders */
.recent-orders {
    padding: 2rem;
    border-top: 1px solid rgba(0, 206, 209, 0.1);
}

.recent-orders h4 {
    color: var(--color-dark-turquoise);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.orders-list {
    max-height: 200px;
    overflow-y: auto;
}

.order-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

.order-item:last-child {
    border-bottom: none;
}

.order-symbol {
    font-weight: 600;
    color: var(--color-dark-turquoise);
}

.order-side.buy {
    color: #00ff00;
}

.order-side.sell {
    color: #ff6b6b;
}

.order-status {
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
}

.order-time {
    color: rgba(255, 255, 255, 0.4);
}

.no-orders {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 2rem;
}

/* Confirmation Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    backdrop-filter: blur(10px);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 206, 209, 0.1);
}

.modal-header h3 {
    color: var(--color-dark-turquoise);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-dark-turquoise);
}

.modal-body {
    padding: 2rem;
}

.confirmation-details {
    margin-bottom: 1.5rem;
}

.confirmation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.confirmation-row:last-child {
    border-bottom: none;
    font-weight: 600;
}

.confirmation-row span:first-child {
    color: rgba(255, 255, 255, 0.6);
}

.confirmation-row .value {
    color: #ffffff;
    font-weight: 500;
}

.confirmation-row .value.buy {
    color: #00ff00;
}

.confirmation-row .value.sell {
    color: #ff6b6b;
}

.warning-message {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.warning-message p {
    color: #ffaa00;
    margin: 0;
    font-size: 0.875rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(0, 206, 209, 0.1);
}

.modal-footer button {
    flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .trading-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .market-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .order-form {
        padding: 1.5rem;
    }
    
    .quote-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quote-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
}