/* Responsive Design for 1inch Converter */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-features {
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .converter-actions {
        flex-direction: column;
    }
    
    .converter-actions .btn-primary,
    .converter-actions .btn-secondary {
        width: 100%;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    /* Header */
    .nav-list {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        gap: 0.75rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    /* Converter Widget */
    .converter-widget {
        padding: 1.5rem;
    }
    
    .converter-header h2 {
        font-size: 1.5rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .input-wrapper select {
        min-width: 100%;
        border-top: 1px solid var(--1inch-border-01);
    }
    
    .swap-button {
        margin: 0.5rem 0;
    }
    
    .converter-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .converter-actions .btn-primary,
    .converter-actions .btn-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
    }
    
    /* Features Section */
    .features {
        padding: 2rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card .feature-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 1rem;
    }
    
    /* How to Use Section */
    .how-to-use {
        padding: 2rem 0;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .step-card {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .usage-tips {
        padding: 1.5rem;
    }
    
    .usage-tips li {
        padding-left: 1.5rem;
        font-size: 0.9rem;
    }
    
    /* FAQ Section */
    .faq {
        padding: 2rem 0;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body h3 {
        font-size: 1.1rem;
    }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-features {
        gap: 0.5rem;
    }
    
    .feature-item {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .feature-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Converter Widget */
    .converter-widget {
        padding: 1rem;
    }
    
    .converter-header {
        margin-bottom: 1.5rem;
    }
    
    .converter-header h2 {
        font-size: 1.25rem;
    }
    
    .converter-header p {
        font-size: 0.9rem;
    }
    
    .converter-form {
        gap: 1rem;
    }
    
    .input-group label {
        font-size: 0.9rem;
    }
    
    .input-wrapper input,
    .input-wrapper select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .swap-button button {
        width: 40px;
        height: 40px;
    }
    
    .swap-button svg {
        width: 18px;
        height: 18px;
    }
    
    .converter-actions {
        gap: 0.5rem;
    }
    
    .converter-actions .btn-primary,
    .converter-actions .btn-secondary {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .conversion-history {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .conversion-history h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .history-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Sections */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Features Section */
    .features {
        padding: 1.5rem 0;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-card .feature-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 0.75rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    /* How to Use Section */
    .how-to-use {
        padding: 1.5rem 0;
    }
    
    .step-card {
        padding: 1rem;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .step-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .step-card p {
        font-size: 0.85rem;
    }
    
    .usage-tips {
        padding: 1rem;
    }
    
    .usage-tips h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .usage-tips li {
        padding: 0.5rem 0;
        padding-left: 1.25rem;
        font-size: 0.85rem;
    }
    
    /* FAQ Section */
    .faq {
        padding: 1.5rem 0;
    }
    
    .faq-question {
        padding: 0.75rem;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
    }
    
    .faq-icon {
        width: 18px;
        height: 18px;
    }
    
    .faq-answer {
        padding: 0 0.75rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 0.75rem 0.75rem;
    }
    
    .faq-answer p {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0 0.75rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-section li {
        margin-bottom: 0.5rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 5% auto;
        width: 98%;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body h3 {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-body p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .close-modal {
        font-size: 1.25rem;
        padding: 0.25rem;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .converter-widget {
        padding: 1rem;
    }
    
    .features,
    .how-to-use,
    .faq {
        padding: 1rem 0;
    }
    
    .modal-content {
        margin: 2% auto;
        max-height: 95vh;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon,
    .faq-icon,
    .swap-button svg {
        transform: scale(1.1);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .swap-button button:hover svg,
    .faq-item.active .faq-icon {
        transform: none;
    }
    
    .feature-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --1inch-text-01: #e1e5e9;
        --1inch-text-03: #ffffff;
        --1inch-text-13: #a0aec0;
        --1inch-bg-01: #1a202c;
        --1inch-bg-02: #2d3748;
        --1inch-bg-03: #4a5568;
        --1inch-border-01: #4a5568;
        --1inch-border-04: #718096;
    }
    
    .converter-widget,
    .feature-card,
    .step-card,
    .usage-tips,
    .faq-item,
    .modal-content {
        background: var(--1inch-bg-02);
        border-color: var(--1inch-border-01);
    }
    
    .input-wrapper input {
        background: var(--1inch-bg-02);
        color: var(--1inch-text-01);
    }
    
    .input-wrapper select {
        background: var(--1inch-bg-03);
        color: var(--1inch-text-01);
    }
    
    .history-item {
        background: var(--1inch-bg-03);
    }
}
