/* Mobile-First Responsive Design for SoundStudioPro */

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* Typography */
    html {
        font-size: 56.25%; /* 9px base */
    }
    
    body {
        padding-top: 80px;
        font-size: 1.6rem;
        line-height: 1.6;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 1.5rem;
        max-width: 100%;
    }
    
    /* Button improvements */
    .btn {
        padding: 1.2rem 2rem;
        font-size: 1.6rem;
        font-weight: 600;
        border-radius: 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.8rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s ease;
    }
    
    .btn:hover::before {
        left: 100%;
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }
    
    .btn:active {
        transform: translateY(0);
    }
    
    /* Form improvements */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 1.4rem 1.8rem;
        font-size: 1.6rem;
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: white;
        transition: all 0.3s ease;
        min-height: 48px;
    }
    
    .form-input:focus,
    .form-textarea:focus,
    .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }
    
    /* Card improvements */
    .card {
        border-radius: 16px;
        padding: 2rem;
        margin-bottom: 1.5rem;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
        border: 2px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    /* Grid improvements */
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Hero section improvements */
    .hero {
        padding: 3rem 0 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3.2rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    /* Action buttons */
    .action-btn {
        padding: 1.2rem 1.8rem;
        font-size: 1.4rem;
        border-radius: 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.8rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .action-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s ease;
    }
    
    .action-btn:hover::before {
        left: 100%;
    }
    
    .action-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    }
    
    /* Track cards */
    .track-card {
        border-radius: 16px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
        border: 2px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .track-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
        border-color: rgba(102, 126, 234, 0.3);
    }
    
    /* Audio player improvements */
    .audio-player {
        padding: 1.5rem;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
        border: 2px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border: 3px solid rgba(255, 255, 255, 0.2);
        color: white;
        font-size: 2.4rem;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 10;
        pointer-events: auto;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    .play-btn:hover {
        background: linear-gradient(135deg, #5a67d8, #6b46c1);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    
    .play-btn:active {
        transform: translateY(0) scale(0.95);
    }
    
    /* Progress bar improvements */
    .progress-container {
        height: 8px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.1);
        cursor: pointer;
        position: relative;
        margin: 1.5rem 0;
        touch-action: manipulation;
    }
    
    .progress-bar {
        height: 100%;
        background: linear-gradient(90deg, #667eea, #764ba2);
        border-radius: 4px;
        transition: width 0.1s ease;
    }
    
    /* Volume slider improvements */
    .volume-slider {
        width: 120px;
        height: 6px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
        outline: none;
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /* Navigation improvements */
    .nav {
        display: none;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left {
        flex: 1;
    }
    
    .header-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: white;
        font-size: 2rem;
        cursor: pointer;
        padding: 1rem;
        width: 50px;
        height: 50px;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10001;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-menu-toggle:hover {
        background: linear-gradient(135deg, #5a67d8, #6b46c1);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    
    /* Section improvements */
    .section-title {
        font-size: 2.4rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Stats improvements */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
        border: 2px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    /* Comments improvements */
    .comment {
        padding: 1.5rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 1rem;
    }
    
    .comment-form {
        margin-bottom: 2rem;
    }
    
    .comment-input {
        padding: 1.2rem 1.5rem;
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 1.6rem;
        min-height: 48px;
        resize: vertical;
    }
    
    /* Modal improvements */
    .modal {
        padding: 2rem;
        border-radius: 16px;
        max-width: 90vw;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content {
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(10, 10, 10, 0.98), rgba(26, 32, 44, 0.98));
        backdrop-filter: blur(25px);
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Footer improvements */
    .footer {
        padding: 3rem 0 2rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Touch improvements */
    * {
        touch-action: manipulation;
    }
    
    /* Ensure minimum touch targets */
    button, a, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Loading states */
    .loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid rgba(255, 255, 255, 0.1);
        border-top: 4px solid #667eea;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    html {
        font-size: 50%; /* 8px base */
    }
    
    body {
        padding-top: 70px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.4rem;
    }
    
    .action-btn {
        padding: 1rem 1.5rem;
        font-size: 1.3rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .track-card {
        padding: 1.2rem;
    }
    
    .audio-player {
        padding: 1.2rem;
    }
    
    .modal {
        padding: 1.5rem;
        max-width: 95vw;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-top: 60px;
    }
    
    .hero {
        padding: 2rem 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn,
    .action-btn,
    .play-btn,
    .mobile-menu-toggle {
        border-width: 1px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, no changes needed */
}

/* Print styles */
@media print {
    .mobile-menu-toggle,
    .nav,
    .mobile-menu {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        background: white;
        color: black;
    }
} 