/* PasteVault Responsive Styles */

/* Tablet and below */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .pastes-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: var(--background-card);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        transform: translateY(-150%);
        transition: transform 0.3s;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
    }
    
    .navbar-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-link {
        padding: 0.75rem 1.5rem;
        width: 100%;
    }
    
    .navbar-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 1.5rem;
        gap: 0.75rem;
    }
    
    .navbar-actions .btn {
        width: 100%;
    }
    
    /* Hero */
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    /* Sections */
    .features, .recent-pastes, .faq {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Paste Grid */
    .pastes-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 2rem 0 1.5rem;
    }
    
    /* Auth */
    .auth-container {
        padding: 2rem 0;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    /* Code blocks */
    .code-block {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    /* Paste view */
    .paste-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .paste-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .paste-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.5rem);
    }
    
    /* Editor toolbar */
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .toolbar-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .paste-card {
        padding: 1rem;
    }
    
    .paste-actions .btn {
        min-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Print styles */
@media print {
    .navbar, .footer, .paste-actions, .editor-toolbar {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card, .paste-content {
        border: 1px solid #ccc;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #4a4a5a;
    }
    
    .btn-primary {
        background: #5558ff;
    }
    
    .form-control:focus {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
