/* ========================================
   MediaSnap AI - Mobile App Specific Styles
   Only loads in Capacitor mobile app
   ======================================== */

/* Logo image - applies to all screen sizes */
.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 12px;
}

/* Fix vertical alignment of logo section */
.logo-section {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.logo-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

/* Tools Section Styles */
.tools-section {
    padding: 20px;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    min-height: 100vh;
}

.tools-content {
    margin-top: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tool-card:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 4px 0;
}

.tool-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.4;
}

.tool-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-arrow {
    color: #667eea;
    transform: translateX(4px);
}

/* Mobile-only: Reduce font size for better fit */
@media (max-width: 768px) {
    html {
        font-size: 12px !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }
    
    /* Reduce icon sizes in bottom nav */
    .nav-btn i {
        font-size: 15px !important;
    }
    
    .nav-btn span {
        font-size: 9px !important;
        white-space: nowrap !important;
    }
    
    /* Logo image - smaller on mobile */
    .logo-image {
        width: 28px !important;
        height: 28px !important;
        object-fit: contain !important;
        margin-right: 6px !important;
    }
    
    /* Tools section mobile adjustments */
    .tools-section {
        padding: 16px;
    }
    
    .tool-card {
        padding: 16px;
        gap: 12px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .tool-info h3 {
        font-size: 16px;
    }
    
    .tool-info p {
        font-size: 13px;
    }
}

/* Tool Interface Modal Styles */
.tool-interface-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 20px;
}

.tool-upload-section {
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.upload-area h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 20px 0;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.image-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .preview-overlay {
    opacity: 1;
}

.change-image-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.tool-options {
    margin: 20px 0;
}

.tool-options h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.options-grid {
    display: grid;
    gap: 16px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.option-group select,
.option-group input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
}

.option-group select:focus,
.option-group input[type="range"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for tool modal */
@media (max-width: 768px) {
    .tool-interface-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .upload-area {
        padding: 30px 16px;
    }
    
    .upload-icon {
        font-size: 40px;
    }
    
    .upload-area h3 {
        font-size: 16px;
    }
    
    .upload-area p {
        font-size: 13px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
    }
}
    
    /* Keep logo section aligned */
    .logo-section {
        gap: 6px !important;
    }
    
    /* Adjust header logo text - smaller on mobile */
    .main-title {
        font-size: 16px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }
    
    .title-primary,
    .title-accent {
        font-size: 16px !important;
    }
    
    /* Header actions icons */
    .header-actions button {
        font-size: 14px !important;
        padding: 8px !important;
    }
    
    .header-actions i {
        font-size: 16px !important;
    }
    
    .logo-icon {
        font-size: 24px !important;
    }
    
    /* Section tab name under logo - SMALLER */
    .tab-name {
        font-size: 10px !important;
        padding: 2px 8px !important;
        margin-top: 2px !important;
    }
    
    /* Fix bottom nav to prevent cut-off */
    .bottom-nav {
        padding: 6px 4px !important;
        gap: 2px !important;
    }
    
    .nav-btn {
        padding: 4px 2px !important;
        min-width: 0 !important;
        flex: 1 !important;
        max-width: 20% !important;
    }
    
    /* Adjust button sizes */
    button, .btn {
        font-size: 12px !important;
        padding: 10px 16px !important;
    }
    
    /* Adjust card text */
    .transform-card h3 {
        font-size: 12px !important;
    }
    
    .transform-card h4,
    .transform-card-title,
    .generation-card-info h4 {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
    
    .transform-card p,
    .generation-card-info p {
        font-size: 10px !important;
    }
    
    /* Category tabs */
    .category-tab {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }
    
    /* Reduce heading sizes */
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    h4 {
        font-size: 14px !important;
    }
    
    /* Feature badges - keep reasonable size */
    .feature-badge {
        padding: 1.5rem 1rem !important;
    }
    
    .badge-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .badge-icon i {
        font-size: 24px !important;
    }
    
    .badge-label {
        font-size: 12px !important;
    }
    
    /* Reduce icon sizes globally */
    i.fas, i.far, i.fab {
        font-size: 14px !important;
    }
    
    /* Ensure proper header padding */
    main,
    .main-content {
        padding-top: 60px !important;
    }

