/* responsive.css - Comprehensive Mobile Fixes */
:root {
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
}

/* Base Mobile Improvements */
@media (max-width: 768px) {
    /* Global Layout Improvements */
    .container {
        padding: 0 1rem;
        width: 100%;
        overflow-x: hidden;
    }

    /* Header & Navigation Mobile Overhaul */
    header .container {
        flex-direction: row;
        padding: 0.5rem 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    /* Mobile Menu Implementation */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: white;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
    }

    /* User Menu Mobile Fix */
    .user-menu {
        width: 100%;
        text-align: center;
    }

    .user-dropdown {
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
    }

    /* Hero Section Mobile Optimization */
    .landingpage {
        padding: 3rem 1rem;
        margin: 1rem;
        border-radius: 15px;
    }

    .landingpage h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        line-height: 1.3;
    }

    .landingpage p {
        font-size: clamp(1rem, 4vw, 1.1rem);
        line-height: 1.5;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    /* Form Mobile Optimization */
    .form-container {
        margin: 0.5rem;
        border-radius: 15px;
    }

    .form-header {
        padding: 1.5rem 1rem;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }

    .progress-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .progress-step {
        text-align: left;
        padding: 0.5rem;
    }

    .color-selection-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .color-option {
        aspect-ratio: 1;
    }

    .selected-palette {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .selected-color {
        width: 50px;
        height: 50px;
    }

    /* Button Sizes for Touch */
    .btn, .export-btn, .auth-submit {
        min-height: 44px; /* Minimum touch target size */
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .form-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .form-controls .btn {
        width: 100%;
    }

    /* Documentation Mobile Improvements */
    .doc-section {
        padding: 1.5rem 1rem;
        margin: 1rem 0;
    }

    .page-title h1 {
        font-size: 1.8rem;
    }

    .page-title p {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .step-list li {
        padding-left: 2.5rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Advanced Tools Mobile Optimization */
    .tools-hero {
        padding: 2rem 1rem;
        margin: -1rem -1rem 2rem;
        border-radius: 0 0 15px 15px;
    }

    .tools-hero h1 {
        font-size: 1.8rem;
    }

    .tool-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }

    .color-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vision-types {
        flex-direction: column;
        align-items: center;
    }

    .color-test {
        grid-template-columns: 1fr;
    }

    /* About Page Mobile Improvements */
    .hero {
        height: 50vh;
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .mission {
        flex-direction: column;
        gap: 2rem;
    }

    .values-grid, .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .cta-section {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }

    /* Dashboard Mobile Improvements */
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .palettes-grid {
        grid-template-columns: 1fr;
    }

    .analytics-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer Mobile Improvements */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Modal Mobile Improvements */
    .auth-content, .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    /* Feedback Corner Button */
    .feedback-trigger {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        bottom: 10px;
        right: 10px;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .palettes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .workspace-layout {
        grid-template-columns: 250px 1fr;
    }

    .workspace-sidebar.right-sidebar {
        display: none;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 480px) {
    .color-selection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .analytics-stats {
        grid-template-columns: 1fr;
    }

    .export-options {
        flex-direction: column;
    }

    .export-btn {
        min-width: auto;
    }

    .tag-options {
        justify-content: center;
    }

    .tag-option {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .color-option:hover,
    .feature-card:hover,
    .team-member:hover {
        transform: none;
    }

    .nav-links a::after {
        display: none;
    }

    /* Increase touch targets */
    .nav-links a,
    .btn,
    .export-btn,
    .tag-option {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo h1 {
        font-weight: 600;
    }
    
    .cta-button {
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* Print Styles */
@media print {
    .nav-links,
    .feedback-corner,
    .auth-modal {
        display: none !important;
    }
    
    .container {
        max-width: none;
    }
}