/* Responsive Design */

/* Tablet and Medium Screens */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    .editing-layout {
        grid-template-columns: 1fr 350px;
    }
}

/* Small Laptops */
@media (max-width: 900px) {
    .editing-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    
    .video-preview-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .controls-panel {
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 50vh;
    }
}

/* Mobile and Tablet Portrait */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Mobile overlay active state */
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Sidebar mobile behavior */
    .sidebar {
        width: 280px;
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Main content adjustments */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 0;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    /* Page header mobile adjustments */
    .page-header {
        padding: 1.5rem 1rem 1rem;
        margin-top: 60px; /* Account for hamburger menu */
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* Sidebar header mobile */
    .sidebar-header {
        padding: 2rem 1rem 1rem;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .sidebar-header h1 {
        font-size: 1.5rem;
    }
    
    /* Navigation menu mobile layout */
    .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    /* Navigation search mobile */
    .nav-search {
        margin: 1rem .5rem;
        position: relative;
    }
    
    .nav-search input {
        width: 100%;
        padding: 0.875rem 1rem 0.875rem 2.75rem;
        font-size: 1rem;
        border-radius: var(--border-radius);
        border: 2px solid var(--border-color);
        background: var(--surface-primary);
        color: var(--text-primary);
        /* Improve touch targets */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
    }
    
    .nav-search input:focus {
        border-color: var(--primary-color);
        background: var(--surface-secondary);
        box-shadow: var(--box-shadow-primary-light);
    }
    
    .nav-search i {
        left: 1rem;
        font-size: 1rem;
        color: var(--text-secondary);
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        border-radius: 0;
        background: transparent;
        border: none;
        text-align: left;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Improve touch targets */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 56px;
        display: flex;
        align-items: center;
    }
    
    .nav-link i {
        font-size: 1.2rem;
        width: 24px;
        margin-right: 0.75rem;
    }
    
    .nav-link span {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .nav-link:hover {
        transform: none;
        background: var(--surface-hover);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: inset 4px 0 0 var(--primary-color);
    }
    
    .nav-item.active .nav-link {
        background: var(--surface-active);
        box-shadow: inset 4px 0 0 var(--primary-color);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Content sections mobile */
    section {
        margin: 1rem;
    }
    
    /* Home page mobile adjustments */
    .welcome-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem 0.75rem;
    }
    
    .stat-content h3 {
        font-size: 2rem;
    }
    
    .welcome-description h2 {
        font-size: 1.6rem;
    }
    
    .welcome-description p {
        font-size: 1rem;
    }
    
    .tools-category {
        margin: 1rem;
    }
    
    .getting-started {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .start-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .start-card {
        padding: 1.5rem;
    }
    
    .start-content h3 {
        font-size: 1.2rem;
    }
    
    .features-highlight {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Tool settings mobile optimizations */
    .tool-settings {
        margin: 1rem;
        border-radius: var(--border-radius);
    }
    
    .settings-header {
        padding: 1.5rem 1rem 1rem;
        text-align: center;
    }
    
    .settings-header h2 {
        font-size: 1.4rem;
    }
    
    .settings-grid {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .setting-group {
        gap: 0.75rem;
    }
    
    .setting-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Choice buttons mobile */
    .choice-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .choice-btn {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
        /* Improve touch targets */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .choice-btn i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .choice-btn span {
        font-weight: 600;
        line-height: 1.2;
    }
    
    .choice-btn small {
        font-size: 0.75rem;
        opacity: 0.8;
        line-height: 1.2;
    }
    
    /* Range controls mobile */
    .range-control {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .range-input {
        height: 12px;
        border-radius: 6px;
        /* Increase touch target area */
        min-height: 44px;
        padding: 16px 0;
        background-clip: content-box;
        /* Improve mobile touch handling */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .range-input::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        border: 3px solid white;
        /* Ensure thumb is easily tappable */
        cursor: pointer;
        /* Better mobile interaction */
        touch-action: manipulation;
    }
    
    .range-input::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border: 3px solid white;
        cursor: pointer;
    }
    
    .range-value {
        align-self: center;
        font-size: 1rem;
        padding: 0.5rem 1rem;
        min-width: 80px;
        border-radius: var(--border-radius);
    }
    
    /* Input wrapper improvements */
    .input-wrapper {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: 0.5rem;
    }
    
    /* Primary action button mobile */
    .primary-action-button {
        padding: 1.25rem 2rem;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: var(--border-radius);
        /* Improve touch targets */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 56px;
    }
    
    .primary-action-button:disabled {
        opacity: 0.6;
    }
    
    /* Upload section mobile */
    .upload-section {
        margin: 1rem;
    }
    
    .upload-header {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .upload-header h2 {
        font-size: 1.4rem;
    }
    
    .upload-area {
        margin: 1rem 0;
        padding: 2rem 1rem;
        border-radius: var(--border-radius);
    }
    
    .upload-label {
        padding: 1.25rem 2rem;
        font-size: 1.1rem;
        border-radius: var(--border-radius);
        /* Improve touch targets */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .upload-label i {
        font-size: 1.2rem;
    }
    
    /* Current video info mobile */
    .current-video {
        margin: 1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .video-info {
        justify-content: center;
    }
    
    .video-details h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .video-details p {
        font-size: 0.9rem;
    }
    
    .status-badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: var(--border-radius);
    }
    
    /* Progress container mobile */
    .progress-container {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .progress-info {
        margin-bottom: 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .progress-text {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .progress-percentage {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .progress-bar {
        height: 8px;
        border-radius: 4px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .processed-file-item {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .processed-file-item .file-actions {
        justify-content: center;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
    
    /* Trimmer Responsive */
    .trimmer-container {
        padding: 1rem;
    }
    
    .timeline-track {
        height: 50px;
    }
    
    .timeline-handle {
        width: 16px;
        height: 60px;
        top: -5px;
    }
    
    .timeline-playhead {
        height: 70px;
        top: -10px;
    }
    
    .time-displays {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .time-display span {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
        min-width: 70px;
    }
    
    .playback-controls {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    .control-btn.play-pause {
        width: 48px;
        height: 48px;
    }
    
    .trim-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .trim-btn,
    .cancel-trim-btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* File list Responsive */
    .file-list-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .file-list-actions {
        justify-content: center;
    }
    
    /* Resize/Crop Responsive */
    .dimension-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .resize-option-group {
        padding: 0.75rem;
    }
    
    .dimension-input {
        padding: 0.6rem;
    }
    
    .video-preview-container {
        max-width: 100%;
    }
    
    .preview-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .position-info {
        justify-content: center;
    }
    
    .range-input-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .range-value {
        min-width: 45px;
        font-size: 1rem;
    }
    
    /* Video Tool Responsive */
    .video-preview-panel,
    .controls-panel {
        padding: 1.5rem;
    }
    
    .control-groups {
        gap: 1.5rem;
    }
    
    /* Watermark Responsive */
    .video-preview-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .preview-header h4 {
        font-size: 1.1rem;
    }
    
    .watermark-file-area {
        padding: 1.5rem;
    }
    
    .watermark-file-area i {
        font-size: 1.5rem;
    }
    
    /* Tool Settings Responsive */
    .preset-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .preset-btn {
        min-height: 70px;
        padding: 0.75rem 0.5rem;
    }
    
    .settings-grid {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .range-control {
        gap: 0.75rem;
    }
    
    .range-value {
        min-width: 45px;
        font-size: 1rem;
    }
    
    /* Transformation Responsive */
    .transformation-buttons {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .transform-btn {
        min-height: 90px;
        padding: 1rem 0.75rem;
    }
    
    .transform-btn i {
        font-size: 1.3rem;
    }
    
    .transform-btn span {
        font-size: 0.9rem;
    }
    
    .transform-btn small {
        font-size: 0.7rem;
    }
    
    .selected-transform {
        min-height: 70px;
        padding: 0.75rem;
    }
    
    .selected-info {
        gap: 0.75rem;
    }
    
    .selected-info i {
        font-size: 1.3rem;
    }
    
    /* Effects Responsive */
    .custom-framerate-container {
        padding: 1rem;
        margin-top: 0.75rem;
    }
    
    .framerate-input {
        padding: 0.75rem 3rem 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .input-help {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    /* Tool Content Responsive */
    .tool-content {
        padding: 1rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
}

/* Time Input Responsive */
@media (max-width: 480px) {
    /* Home page small mobile adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem 0.5rem;
    }
    
    .stat-icon i {
        font-size: 2rem;
    }
    
    .stat-content h3 {
        font-size: 1.8rem;
    }
    
    .welcome-description h2 {
        font-size: 1.4rem;
    }
    
    .start-icon i {
        font-size: 2.5rem;
    }
    
    .feature-highlight i {
        font-size: 2rem;
    }
    
    .time-inputs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .nav-menu {
        grid-template-columns: 1fr;
    }
    
    .sidebar-header .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Trimmer Small Mobile */
    .time-displays {
        grid-template-columns: 1fr;
    }
    
    .control-btn.preview-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Resize/Crop Small Mobile */
    .aspect-ratio-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Video Preview Small Mobile */
    .video-preview-container {
        margin: 1rem -1rem;
        border-radius: 0;
        min-height: 250px;
    }
    
    .crop-handle.corner {
        width: 16px;
        height: 16px;
    }
    
    .crop-handle.move {
        width: 24px;
        height: 24px;
    }
    
    .crop-handle.top, .crop-handle.bottom {
        width: 24px;
        height: 8px;
    }
    
    .crop-handle.left, .crop-handle.right {
        width: 8px;
        height: 24px;
    }
    
    /* Tool Settings Small Mobile */
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .preset-btn {
        min-height: 60px;
        padding: 0.5rem;
    }
    
    .preset-btn i {
        font-size: 1rem;
    }
    
    .preset-btn span {
        font-size: 0.9rem;
    }
    
    .preset-btn small {
        font-size: 0.7rem;
    }
    
    .radio-option {
        padding: 0.75rem;
    }
    
    .settings-grid {
        padding: 1rem;
    }
    
    /* Transformation Small Mobile */
    .transformation-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .transform-btn {
        min-height: 80px;
        padding: 0.75rem 0.5rem;
    }
    
    .transform-btn i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .transform-btn span {
        font-size: 0.85rem;
    }
    
    .transform-btn small {
        font-size: 0.65rem;
    }
    
    .no-selection i {
        font-size: 1.3rem;
    }
    
    .no-selection p {
        font-size: 0.85rem;
    }
    
    /* Custom Angle Small Mobile */
    .custom-angle-control {
        gap: 0.5rem;
    }
    
    .apply-angle-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Effects Small Mobile */
    .framerate-input-wrapper {
        margin-bottom: 0.5rem;
    }
    
    .framerate-input {
        padding: 0.6875rem 2.75rem 0.6875rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .input-suffix {
        right: 0.75rem;
        font-size: 0.8rem;
    }
    
    .input-help {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
} 