/* =========================
   Mobile Responsive - Simple Fix
   ========================= */

/* Mobile only (up to 768px) */
@media (max-width: 768px) {
    :root {
        --hero-time-size: 2.4rem;
        --hero-date-size: 0.75rem;
        --hero-greeting-size: 0.7rem;
        --container-width: 96%;
    }

    body {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .container {
        padding: 3.5rem 0.5rem 1.5rem;
        width: var(--container-width);
        height: auto;
        min-height: calc(100vh - 2rem);
        overflow: visible;
    }

    main {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem 0.5rem;
    }

    .category-group {
        padding: 0.4rem 0.3rem;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.2rem;
    }

    .link-item {
        padding: 0.35rem 0.25rem;
        gap: 0.35rem;
    }

    .link-icon {
        width: 18px;
        height: 18px;
    }

    .link-name {
        font-size: 0.72rem;
    }

    .category-title {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
        padding: 0.1rem 0.3rem 0.25rem;
    }

    .greeting-pill {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }

    .search-section {
        margin: 0.8rem 0 1.2rem;
    }

    .search-container {
        height: 44px;
        border-radius: 22px;
        padding: 0 0.3rem 0 0.6rem;
    }

    .search-engine-selector {
        font-size: 0.72rem;
        padding-right: 0.35rem;
    }

    #current-engine-icon {
        max-width: 40px;
    }

    #search-input {
        font-size: 0.85rem;
    }

    .search-hint {
        display: none;
    }

    #search-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .floating-toolbar {
        top: 0.4rem;
        right: 0.4rem;
        gap: 0.3rem;
    }

    /* Show weather widget on mobile */
    .weather-widget {
        display: flex !important;
        background: rgba(15, 23, 42, 0.15);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        padding: 0.4rem 0.6rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .weather-widget-main {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .weather-icon {
        width: 24px;
        height: 24px;
    }

    .weather-temp {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .weather-country,
    .weather-city {
        display: none;
    }

    .weather-detail {
        display: none;
    }

    .theme-toggle-btn,
    .settings-toggle-btn {
        width: 30px;
        height: 30px;
    }

    .lang-toggle-btn {
        height: 30px;
        padding: 0 0.4rem;
        font-size: 0.65rem;
        border-radius: 15px;
    }

    .lang-toggle-btn #lang-label {
        max-width: 40px;
    }
}

/* Small mobile (up to 480px) */
@media (max-width: 480px) {
    :root {
        --hero-time-size: 2rem;
        --hero-date-size: 0.68rem;
    }

    .container {
        padding: 3rem 0.35rem 1rem;
    }

    .hero-section {
        margin-bottom: 0.3rem;
    }

    main {
        gap: 0.5rem 0.4rem;
    }

    .link-item {
        padding: 0.3rem 0.2rem;
    }

    .link-icon {
        width: 16px;
        height: 16px;
    }

    .link-name {
        font-size: 0.68rem;
    }

    .search-container {
        height: 42px;
    }

    #search-btn {
        width: 30px;
        height: 30px;
    }

    .floating-toolbar {
        gap: 0.25rem;
    }

    .theme-toggle-btn,
    .settings-toggle-btn {
        width: 28px;
        height: 28px;
    }

    .lang-toggle-btn {
        height: 28px;
        padding: 0 0.35rem;
        font-size: 0.6rem;
    }

    .lang-toggle-btn #lang-label {
        max-width: 35px;
    }
}

/* Very small mobile (up to 360px) */
@media (max-width: 360px) {
    :root {
        --hero-time-size: 1.8rem;
        --hero-date-size: 0.62rem;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .category-title {
        font-size: 0.55rem;
    }

    .link-icon {
        width: 14px;
        height: 14px;
    }

    .link-name {
        font-size: 0.62rem;
    }

    .lang-toggle-btn #lang-label {
        display: none;
    }

    .lang-toggle-btn {
        width: 28px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .lang-toggle-btn .selector-arrow {
        display: none;
    }

    .floating-toolbar {
        gap: 0.2rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    main {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .container {
        padding-top: 2rem;
    }
}