/* Mobile Responsive Styles for CryptoX Exchange */

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* General Layout */
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Header Styles */
    .header-container {
        padding: 10px 15px;
        position: relative;
    }
    
    .logo {
        font-size: 22px;
    }
    
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 101;
    }
    
    .hamburger-icon {
        position: relative;
        width: 24px;
        height: 18px;
    }
    
    .hamburger-icon span {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: var(--light-color);
        transition: all 0.3s ease;
        left: 0;
    }
    
    .hamburger-icon span:nth-child(1) {
        top: 0;
    }
    
    .hamburger-icon span:nth-child(2) {
        top: 8px;
    }
    
    .hamburger-icon span:nth-child(3) {
        top: 16px;
    }
    
    body.mobile-menu-open .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg);
        top: 8px;
    }
    
    body.mobile-menu-open .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }
    
    body.mobile-menu-open .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg);
        top: 8px;
    }
    
    /* Navigation */
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(145deg, var(--dark-color), var(--card-background));
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    body.mobile-menu-open .main-nav {
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 0 20px;
        margin: 0;
    }
    
    .main-nav ul li {
        margin: 0;
        padding: 12px 0;
        border-bottom: 1px solid rgba(38, 208, 206, 0.1);
        width: 100%;
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 8px 0;
    }
    
    /* User Menu Dropdown */
    .user-menu .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
        border-radius: 4px;
    }
    
    .user-menu .user-dropdown ul {
        padding: 0;
    }
    
    .user-menu .user-dropdown li {
        padding: 0;
        border-bottom: 1px solid rgba(38, 208, 206, 0.1);
    }
    
    .user-menu .user-dropdown li:last-child {
        border-bottom: none;
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }
    
    /* Footer Styles */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 15px;
    }
    
    /* Forms and Inputs */
    input, select, textarea, button {
        width: 100%;
    }
    
    /* Profile Page */
    .profile-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 15px !important;
    }
    
    .profile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .profile-tabs ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        min-width: max-content;
    }
    
    .profile-tabs li {
        margin-right: 15px;
    }
    
    .profile-tabs a {
        display: block;
        padding: 10px 5px;
        color: var(--light-color);
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 14px;
    }
    
    .profile-tabs a.active {
        color: var(--secondary-color);
        border-bottom: 2px solid var(--secondary-color);
        font-weight: 600;
    }
    
    .dashboard-content {
        padding: 0 !important;
    }
    
    .tab-content {
        margin-bottom: 20px;
    }
    
    .tab-content .card {
        background: linear-gradient(145deg, var(--card-background), rgba(30, 40, 58, 0.7));
        padding: 15px;
        border-radius: 8px;
        border: 1px solid rgba(38, 208, 206, 0.1);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 5px;
        color: var(--light-color);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 10px;
        background-color: rgba(20, 30, 48, 0.7);
        color: var(--light-color);
        border: 1px solid rgba(38, 208, 206, 0.2);
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--secondary-color);
        outline: none;
        box-shadow: 0 0 0 2px rgba(38, 208, 206, 0.2);
    }
    
    .dashboard-sidebar {
        margin-bottom: 20px;
    }
    
    .dashboard-grid {
        display: block;
    }
    
    /* Profile Photo Upload Improvements */
    .profile-photo-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px;
    }
    
    .profile-photo-preview {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(38, 208, 206, 0.3);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        margin-bottom: 15px;
    }
    
    .custom-file-upload {
        display: inline-block;
        padding: 8px 16px;
        background: linear-gradient(145deg, #26d0ce, #1a7aaf);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 4px 10px rgba(26, 122, 175, 0.3);
        transition: all 0.3s ease;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .custom-file-upload:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(26, 122, 175, 0.4);
    }
    
    .file-upload-info {
        font-size: 0.8rem;
        color: var(--light-color);
        opacity: 0.7;
        text-align: center;
    }
    
    /* Wallet Page */
    .wallet-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .wallet-action-card {
        width: 100%;
    }
    
    .wallet-balance {
        font-size: 1.5rem !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    /* Tables */
    .table-responsive,
    .crypto-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        position: relative;
        width: 100%;
    }
    
    .crypto-table::before {
        content: 'Swipe to view more →';
        position: absolute;
        right: 0;
        top: -25px;
        font-size: 12px;
        color: var(--secondary-color);
        opacity: 0.8;
        animation: fadeInOut 2s infinite;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0.5; }
        50% { opacity: 1; }
    }
    
    table {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
        background: linear-gradient(145deg, var(--card-background), rgba(30, 40, 58, 0.7));
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    table thead {
        background: rgba(38, 208, 206, 0.1);
    }
    
    table th {
        padding: 12px 15px;
        text-align: left;
        font-weight: 600;
        font-size: 14px;
        color: var(--secondary-color);
        white-space: nowrap;
        border-bottom: 1px solid rgba(38, 208, 206, 0.1);
    }
    
    table td {
        padding: 12px 15px;
        font-size: 13px;
        color: var(--light-color);
        border-bottom: 1px solid rgba(38, 208, 206, 0.05);
        white-space: nowrap;
    }
    
    /* Column-specific styles */
    table th:nth-child(1), /* Date */
    table td:nth-child(1) {
        min-width: 100px;
    }
    
    table th:nth-child(2), /* Type */
    table td:nth-child(2) {
        min-width: 80px;
    }
    
    table th:nth-child(3), /* Coin */
    table td:nth-child(3) {
        min-width: 60px;
    }
    
    table th:nth-child(4), /* Amount */
    table td:nth-child(4) {
        min-width: 120px;
        text-align: right;
    }
    
    table th:nth-child(5), /* Fee */
    table td:nth-child(5) {
        min-width: 100px;
        text-align: right;
    }
    
    table th:nth-child(6), /* Status */
    table td:nth-child(6) {
        min-width: 90px;
    }
    
    table th:nth-child(7), /* Transaction ID */
    table td:nth-child(7) {
        min-width: 100px;
    }
    
    table tr:last-child td {
        border-bottom: none;
    }
    
    table tr:hover td {
        background: rgba(38, 208, 206, 0.05);
    }
    
    /* Transaction status colors */
    td .status-completed,
    td .status-success {
        color: var(--secondary-color);
        font-weight: 600;
    }
    
    td .status-pending {
        color: #f39c12;
        font-weight: 600;
    }
    
    td .status-failed,
    td .status-rejected {
        color: #e74c3c;
        font-weight: 600;
    }
    
    /* QR Code */
    #qrcode-container {
        max-width: 100%;
    }
}

/* Small Mobile Devices */
@media (max-width: 250px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        padding: 20px 15px;
    }
    
    .profile-settings {
        padding: 15px;
    }
    
    .profile-content {
        padding: 10px;
    }
    
    /* Adjust font sizes */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
}

