/* Mobile Optimized CSS for Wazifa Generator */

/* Mobile-first responsive design */
@media (max-width: 768px) {
    
    /* Base mobile styles */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection for content areas */
    .wazifa-content, .wazifa-description, .wazifa-text {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* Mobile container */
    .wazifa-container {
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }
    
    /* Mobile header */
    .wazifa-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .wazifa-header h1 {
        font-size: 1.5rem;
        margin: 0;
        color: white;
        text-align: center;
    }
    
    /* Mobile navigation */
    .wazifa-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 0.5rem 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .wazifa-nav ul {
        display: flex;
        justify-content: space-around;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .wazifa-nav li {
        flex: 1;
        text-align: center;
    }
    
    .wazifa-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        color: #6b7280;
        text-decoration: none;
        font-size: 0.75rem;
        transition: color 0.3s ease;
    }
    
    .wazifa-nav a:hover,
    .wazifa-nav a.active {
        color: #667eea;
    }
    
    .wazifa-nav i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    /* Mobile main content */
    .wazifa-main {
        margin-top: 4rem;
        margin-bottom: 5rem;
        padding: 1rem;
        min-height: calc(100vh - 9rem);
    }
    
    /* Mobile cards */
    .wazifa-card {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border: 1px solid #e5e7eb;
    }
    
    /* Mobile buttons */
    .wazifa-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        border-radius: 0.75rem;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 44px; /* Touch-friendly minimum size */
        min-width: 44px;
    }
    
    .wazifa-btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    
    .wazifa-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
    
    .wazifa-btn-secondary {
        background: #f3f4f6;
        color: #374151;
        border: 1px solid #d1d5db;
    }
    
    .wazifa-btn-secondary:hover {
        background: #e5e7eb;
    }
    
    /* Mobile forms */
    .wazifa-form {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .wazifa-form-group {
        margin-bottom: 1.5rem;
    }
    
    .wazifa-form-label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: #374151;
        font-size: 0.875rem;
    }
    
    .wazifa-form-input,
    .wazifa-form-textarea,
    .wazifa-form-select {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid #e5e7eb;
        border-radius: 0.5rem;
        font-size: 1rem;
        transition: border-color 0.3s ease;
        background: white;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .wazifa-form-input:focus,
    .wazifa-form-textarea:focus,
    .wazifa-form-select:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
    
    /* Mobile modals */
    .wazifa-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    
    .wazifa-modal-content {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        max-width: 90%;
        max-height: 90%;
        overflow-y: auto;
        box-shadow: 0 20px 25px rgba(0,0,0,0.25);
    }
    
    .wazifa-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .wazifa-modal-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: #111827;
        margin: 0;
    }
    
    .wazifa-modal-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #6b7280;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.5rem;
        transition: background-color 0.3s ease;
    }
    
    .wazifa-modal-close:hover {
        background: #f3f4f6;
    }
    
    /* Mobile lists */
    .wazifa-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .wazifa-list-item {
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        transition: background-color 0.3s ease;
    }
    
    .wazifa-list-item:last-child {
        border-bottom: none;
    }
    
    .wazifa-list-item:hover {
        background: #f9fafb;
    }
    
    /* Mobile progress indicators */
    .wazifa-progress {
        background: #e5e7eb;
        border-radius: 1rem;
        height: 0.5rem;
        overflow: hidden;
        margin: 1rem 0;
    }
    
    .wazifa-progress-bar {
        height: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 1rem;
        transition: width 0.3s ease;
    }
    
    /* Mobile notifications */
    .wazifa-notification {
        position: fixed;
        top: 1rem;
        left: 1rem;
        right: 1rem;
        z-index: 3000;
        background: white;
        border-radius: 0.75rem;
        padding: 1rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        border-left: 4px solid #667eea;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    .wazifa-notification.show {
        transform: translateY(0);
    }
    
    .wazifa-notification.success {
        border-left-color: #10b981;
    }
    
    .wazifa-notification.error {
        border-left-color: #ef4444;
    }
    
    .wazifa-notification.warning {
        border-left-color: #f59e0b;
    }
    
    /* Mobile loading states */
    .wazifa-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    
    .wazifa-spinner {
        width: 2rem;
        height: 2rem;
        border: 3px solid #e5e7eb;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Mobile swipe gestures */
    .wazifa-swipeable {
        touch-action: pan-y;
        user-select: none;
    }
    
    /* Mobile pull-to-refresh */
    .wazifa-pull-refresh {
        position: relative;
        overflow: hidden;
    }
    
    .wazifa-pull-refresh-indicator {
        position: absolute;
        top: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        border: 3px solid #e5e7eb;
        border-top: 3px solid #667eea;
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .wazifa-pull-refresh-indicator.active {
        opacity: 1;
        animation: spin 1s linear infinite;
    }
    
    /* Mobile floating action button */
    .wazifa-fab {
        position: fixed;
        bottom: 5rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .wazifa-fab:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
    
    /* Mobile search */
    .wazifa-search {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .wazifa-search-input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        border: 2px solid #e5e7eb;
        border-radius: 0.75rem;
        font-size: 1rem;
        background: white;
        transition: border-color 0.3s ease;
    }
    
    .wazifa-search-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
    
    .wazifa-search-icon {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: #6b7280;
        font-size: 1.25rem;
    }
    
    /* Mobile tabs */
    .wazifa-tabs {
        display: flex;
        background: #f3f4f6;
        border-radius: 0.75rem;
        padding: 0.25rem;
        margin-bottom: 1rem;
    }
    
    .wazifa-tab {
        flex: 1;
        padding: 0.75rem 1rem;
        text-align: center;
        border-radius: 0.5rem;
        background: transparent;
        border: none;
        color: #6b7280;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .wazifa-tab.active {
        background: white;
        color: #667eea;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Mobile grid */
    .wazifa-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .wazifa-grid-item {
        background: white;
        border-radius: 0.75rem;
        padding: 1rem;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }
    
    .wazifa-grid-item:hover {
        transform: translateY(-2px);
    }
    
    /* Mobile responsive images */
    .wazifa-image {
        max-width: 100%;
        height: auto;
        border-radius: 0.5rem;
    }
    
    /* Mobile typography */
    .wazifa-text-xs { font-size: 0.75rem; }
    .wazifa-text-sm { font-size: 0.875rem; }
    .wazifa-text-base { font-size: 1rem; }
    .wazifa-text-lg { font-size: 1.125rem; }
    .wazifa-text-xl { font-size: 1.25rem; }
    .wazifa-text-2xl { font-size: 1.5rem; }
    
    /* Mobile spacing */
    .wazifa-space-1 { margin: 0.25rem; }
    .wazifa-space-2 { margin: 0.5rem; }
    .wazifa-space-3 { margin: 0.75rem; }
    .wazifa-space-4 { margin: 1rem; }
    .wazifa-space-5 { margin: 1.25rem; }
    .wazifa-space-6 { margin: 1.5rem; }
    
    /* Mobile utilities */
    .wazifa-hidden { display: none; }
    .wazifa-block { display: block; }
    .wazifa-flex { display: flex; }
    .wazifa-inline-flex { display: inline-flex; }
    
    .wazifa-text-center { text-align: center; }
    .wazifa-text-left { text-align: left; }
    .wazifa-text-right { text-align: right; }
    
    .wazifa-font-bold { font-weight: 700; }
    .wazifa-font-semibold { font-weight: 600; }
    .wazifa-font-medium { font-weight: 500; }
    .wazifa-font-normal { font-weight: 400; }
    
    /* Mobile dark mode support */
    @media (prefers-color-scheme: dark) {
        .wazifa-container {
            background: #111827;
            color: #f9fafb;
        }
        
        .wazifa-card,
        .wazifa-form,
        .wazifa-modal-content {
            background: #1f2937;
            color: #f9fafb;
            border-color: #374151;
        }
        
        .wazifa-form-input,
        .wazifa-form-textarea,
        .wazifa-form-select {
            background: #374151;
            border-color: #4b5563;
            color: #f9fafb;
        }
        
        .wazifa-nav {
            background: #1f2937;
            border-top-color: #374151;
        }
        
        .wazifa-nav a {
            color: #9ca3af;
        }
        
        .wazifa-nav a:hover,
        .wazifa-nav a.active {
            color: #667eea;
        }
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .wazifa-container {
        max-width: 768px;
        margin: 0 auto;
    }
    
    .wazifa-nav {
        position: static;
        border-top: none;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }
    
    .wazifa-main {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .wazifa-header {
        position: static;
        margin-bottom: 1rem;
    }
    
    .wazifa-nav {
        position: static;
        margin-bottom: 1rem;
    }
    
    .wazifa-main {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
} 