/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .logo span {
        font-size: 0.75rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 1rem;
        display: block;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
        border-radius: 0;
        min-width: auto;
        width: 100%;
    }
    
    .dropdown-menu a {
        padding-left: 2rem;
        font-size: 0.875rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .tool-header {
        padding: 1.5rem 1rem;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .tool-interface {
        padding: 1.5rem 1rem;
    }
    
    .input-group textarea {
        min-height: 150px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .results {
        padding: 1.5rem 1rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .tool-header {
        padding: 2rem 1.5rem;
    }
    
    .tool-interface {
        padding: 2rem 1.5rem;
    }
    
    .results {
        padding: 2rem 1.5rem;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .tool-header {
        padding: 2.5rem 2rem;
    }
    
    .tool-interface {
        padding: 2.5rem 2rem;
    }
    
    .results {
        padding: 2.5rem 2rem;
    }
    
    .content-section {
        padding: 2.5rem 2rem;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        padding: 0 2rem;
    }
    
    .nav-menu {
        gap: 2rem;
    }
    
    .tool-header {
        padding: 3rem 2.5rem;
    }
    
    .tool-header h1 {
        font-size: 2.25rem;
    }
    
    .tool-interface {
        padding: 3rem 2.5rem;
    }
    
    .results {
        padding: 3rem 2.5rem;
    }
    
    .content-section {
        padding: 3rem 2.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
    
    .tool-header {
        padding: 3.5rem 3rem;
    }
    
    .tool-header h1 {
        font-size: 2.5rem;
    }
    
    .tool-interface {
        padding: 3.5rem 3rem;
    }
    
    .results {
        padding: 3.5rem 3rem;
    }
    
    .content-section {
        padding: 3.5rem 3rem;
    }
    
    .input-group textarea {
        min-height: 250px;
    }
    
    .result-text {
        max-height: 500px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .button-group,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .tool-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tool-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .result-text {
        border: 1px solid #ccc;
        background: #fff;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
        --bg-primary: #ffffff;
        --bg-secondary: #f0f0f0;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .dropdown-menu {
        transition: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --primary-hover: #60a5fa;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-light: #94a3b8;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --border-color: #334155;
        --border-hover: #475569;
    }
    
    .tool-header {
        background: linear-gradient(135deg, #1e40af, #3b82f6);
    }
    
    .result-text {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }
    
    .stat-item {
        background: var(--bg-tertiary);
        border-color: var(--border-color);
    }
} 