/* Mobile Responsive Design */
@media (max-width: 1200px) {
    .crypto-grid {
        padding: 0 1rem;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .trading-metrics {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .crypto-container {
        padding: 0.5rem;
    }

    .nav-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .portfolio-section {
        padding: 1.5rem;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .total-balance {
        align-items: flex-start;
        text-align: left;
    }

    .balance-amount {
        font-size: 1.75rem;
    }

    .wallet-grid {
        grid-template-columns: 1fr;
    }

    .trading-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .chart-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .deal-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .deal-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .crypto-table td {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .welcome-card {
        padding: 2rem;
        margin: 1rem;
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .crypto-form {
        padding: 1.5rem;
    }

    .status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .status-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        margin-bottom: 1.5rem;
        min-width: 100%;
    }
    
    .auth-form-container .form-control {
        padding: 0.75rem 0.875rem 0.75rem 2.5rem;
    }
}

@media (max-width: 576px) {
    .crypto-container {
        padding: 0.25rem;
    }

    .crypto-grid {
        gap: 1rem;
    }

    .portfolio-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .balance-amount {
        font-size: 1.5rem;
    }

    .wallet-card {
        padding: 1rem;
    }

    .asset-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .quantity {
        font-size: 1.25rem;
    }

    .trading-metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 0.75rem;
    }

    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .chart-header {
        padding: 1rem;
    }

    .deal-header {
        padding: 1rem;
    }
    
    .crypto-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .deal-title {
        font-size: 1.125rem;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .welcome-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .crypto-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .crypto-form {
        padding: 1rem;
    }

    .form-control {
        padding: 0.75rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .crypto-container {
        padding: 0.125rem;
    }

    .crypto-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .glass-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .welcome-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .welcome-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .welcome-title {
        font-size: 1.25rem;
    }

    .welcome-text {
        font-size: 1rem;
    }

    .crypto-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .balance-amount {
        font-size: 1.25rem;
    }

    .asset-details h3 {
        font-size: 1rem;
    }

    .quantity {
        font-size: 1.125rem;
    }

    .notional {
        font-size: 0.875rem;
    }

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

    .crypto-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .crypto-table td {
        padding: 0.5rem;
        font-size: 0.6875rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .welcome-section {
        min-height: 50vh;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .welcome-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .welcome-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .crypto-container {
        background: white !important;
        padding: 0;
    }

    .crypto-card,
    .glass-card,
    .welcome-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .crypto-btn {
        background: #007bff !important;
        color: white !important;
    }

    .nav-header {
        border-bottom: 1px solid #ccc;
    }

    .section-title {
        color: black !important;
    }

    .text-primary {
        color: black !important;
    }

    .text-secondary {
        color: #666 !important;
    }
}
