/* ============================================
   RESPONSIVE DESIGN FOR ALL PAGES
   Mobile-First Approach
   ============================================ */

/* Base Mobile Styles (320px and up) */
@media (max-width: 768px) {
    
    /* Container */
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    /* ============================================
       NAVIGATION BAR
       ============================================ */
    .navbar {
        padding: 15px 0;
    }
    
    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-brand {
        font-size: 1.3rem;
    }
    
    .custom-lock-logo svg {
        width: 35px;
        height: 41px;
    }
    
    /* Hamburger Menu Button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Mobile Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--light-bg);
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 10px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        font-size: 1rem;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover {
        background: rgba(168, 85, 247, 0.1);
    }
    
    .btn-signup {
        width: 100%;
        padding: 12px 20px !important;
        text-align: center;
    }
    
    /* Menu Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Hide hamburger on desktop */
    @media (min-width: 769px) {
        .mobile-menu-toggle {
            display: none !important;
        }
        
        .nav-menu {
            position: static;
            width: auto;
            height: auto;
            flex-direction: row;
            padding: 0;
            box-shadow: none;
            background: transparent;
        }
        
        .menu-overlay {
            display: none !important;
        }
    }
    
    /* ============================================
       HERO SECTION (Homepage)
       ============================================ */
    .hero {
        padding: 60px 0 40px;
        min-height: auto;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 25px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .hero-lock-container {
        margin-top: 30px;
    }
    
    .hero-lock-container svg {
        width: 200px;
        height: 234px;
    }
    
    /* ============================================
       FEATURES SECTION
       ============================================ */
    .features {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .feature-card p {
        font-size: 0.95rem;
    }
    
    /* ============================================
       HOW IT WORKS SECTION
       ============================================ */
    .how-it-works {
        padding: 40px 0;
    }
    
    .steps-container {
        flex-direction: column !important;
        gap: 20px;
    }
    
    .step {
        width: 100% !important;
        max-width: none !important;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .step h3 {
        font-size: 1.1rem;
    }
    
    .step p {
        font-size: 0.9rem;
    }
    
    /* ============================================
       PURCHASE PAGE
       ============================================ */
    .payment-section {
        padding: 40px 0 !important;
    }
    
    .purchase-header h1 {
        font-size: 1.8rem !important;
    }
    
    .purchase-header p {
        font-size: 1rem !important;
    }
    
    .payment-wrapper {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .payment-form-container {
        padding: 25px 20px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .payment-form input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .country-code {
        width: 100%;
        justify-content: center;
    }
    
    .features-summary-combined {
        position: static !important;
        top: auto !important;
    }
    
    .order-summary {
        padding: 20px;
    }
    
    .order-summary h3 {
        font-size: 1.3rem;
    }
    
    .summary-item.total .price {
        font-size: 1.5rem !important;
    }
    
    .compact-features {
        padding: 20px !important;
    }
    
    .compact-features h4 {
        font-size: 1rem !important;
    }
    
    .compact-features span {
        font-size: 0.85rem !important;
    }
    
    .trust-badges {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    /* ============================================
       ACCOUNT PAGE
       ============================================ */
    .account-section {
        padding: 40px 0;
    }
    
    .user-info-card,
    .license-card {
        padding: 20px;
    }
    
    .user-info h2 {
        font-size: 1.3rem;
    }
    
    .user-phone {
        font-size: 1rem;
    }
    
    .license-card h3 {
        font-size: 1.2rem;
    }
    
    .license-key {
        font-size: 1rem;
        padding: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    /* Transactions Table */
    .transactions-section {
        padding: 20px;
    }
    
    .transactions-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .transactions-table table {
        min-width: 600px;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    /* ============================================
       ADMIN PAGE
       ============================================ */
    .admin-section {
        padding: 40px 0;
    }
    
    .admin-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters select,
    .filters input {
        width: 100%;
    }
    
    .data-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table table {
        min-width: 800px;
    }
    
    /* ============================================
       TERMS PAGE
       ============================================ */
    .terms-section {
        padding: 40px 0;
    }
    
    .terms-content {
        padding: 25px 20px;
    }
    
    .terms-content h1 {
        font-size: 1.8rem;
    }
    
    .terms-content h2 {
        font-size: 1.3rem;
    }
    
    .terms-content p,
    .terms-content li {
        font-size: 0.95rem;
    }
    
    /* ============================================
       SIGNUP/LOGIN PAGES
       ============================================ */
    .auth-section {
        padding: 40px 0;
    }
    
    .auth-container {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
    
    .auth-form input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .social-login {
        flex-direction: column;
        gap: 12px;
    }
    
    .social-btn {
        width: 100%;
    }
    
    /* ============================================
       FAQ SECTION
       ============================================ */
    .faq-section {
        padding: 40px 0;
    }
    
    .faq-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-item h3 {
        font-size: 1.1rem;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    .footer {
        padding: 30px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    /* ============================================
       PAYMENT WAITING MODAL
       ============================================ */
    .payment-modal-content {
        width: 95%;
        max-width: 400px;
        padding: 25px 20px;
        margin: 20px;
    }
    
    .payment-link-display {
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    /* ============================================
       CARDS & BUTTONS
       ============================================ */
    .card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn,
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* ============================================
       UTILITY CLASSES
       ============================================ */
    .text-center-mobile {
        text-align: center;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    /* ============================================
       TOAST NOTIFICATIONS
       ============================================ */
    .toast {
        width: calc(100% - 30px);
        max-width: 350px;
        left: 15px;
        right: 15px;
        margin: 0 auto;
    }
}

/* Tablet Styles (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .payment-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Small Mobile Devices (320px to 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .order-summary h3 {
        font-size: 1.2rem;
    }
    
    .summary-item.total .price {
        font-size: 1.3rem !important;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }
    
    .hero-lock-container {
        display: none;
    }
    
    .navbar {
        padding: 10px 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
    }
}
