/* ============================================
   BARTENDER PRO - STYLE.CSS V56
   Fix: sovrapposizioni calcolatori, immagini mancanti, form bianchi
   Aggiunto: layout verticale Super Juice, supporto testi lunghi
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0a0a0a;
    position: relative;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    color: white;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 1px solid #2a2a2a;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.back-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 0.7rem;
    color: #888;
}

/* Nascondi sottotitolo header su mobile per risparmiare spazio */
@media (max-width: 480px) {
    .logo-text p {
        display: none;
    }
    .logo-text h1 {
        font-size: 1.1rem;
    }
}

/* ============================================
   HEADER ACTIONS
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Il menu-toggle è ora dentro .logo - sempre visibile */
.menu-toggle {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 1.3rem;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: #1a1a1a;
    border-color: #e94560;
}

.search-container {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 10px 16px;
    border: none;
    border-radius: 30px;
    width: 260px;
    max-width: 100%;
    font-size: 0.9rem;
    background: #2a2a2a;
    color: white;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: #888;
}

.search-input:focus {
    background: #3a3a3a;
    width: 300px;
}

.search-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 30px;
    background: #2a2a2a;
    color: #e94560;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #3a3a3a;
}

.search-btn:hover {
    background: #1a1a1a;
    border-color: #e94560;
    transform: scale(1.02);
    color: #e94560;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.language-selector-header {
    position: relative;
}

.language-header-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 40px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.language-header-btn:hover {
    background: #1a1a1a;
    border-color: #e94560;
}

.header-flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    min-width: 150px;
    overflow: hidden;
    display: none;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.language-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    transition: all 0.2s;
}

.dropdown-flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.language-option:hover {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

.language-option.active {
    background: #e94560;
    color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: 1.5rem 1rem;
    background: #0a0a0a;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* ============================================
   CATEGORIE
   ============================================ */
.categories-grid-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    max-width: 100%;
}

.category-circle:hover {
    transform: translateY(-5px);
}

.category-circle .circle-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #D4AF37;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.category-circle .circle-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    text-align: center;
    padding: 0.5rem;
    word-break: break-word;
}

.category-circle:hover .circle-icon {
    transform: scale(1.02);
    border-color: #e94560;
}

.category-circle:hover .circle-text {
    color: #e94560;
}

/* ============================================
   SOTTOCATEGORIE
   ============================================ */
.subcategories-bar {
    display: block;
    margin-bottom: 1.5rem;
    width: 100%;
}

.subcategories-circle {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 2rem;
    margin: 0 auto;
    max-width: 1000px;
}

.subcategory-circle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    padding: 0.5rem;
    max-width: 100%;
}

.subcategory-circle-btn:hover {
    transform: translateY(-5px);
}

.subcategory-circle-btn .circle-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3a3a3a;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.subcategory-circle-btn .circle-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ccc;
    text-align: center;
    padding: 0.3rem;
    word-break: break-word;
}

.subcategory-circle-btn:hover .circle-icon {
    transform: scale(1.05);
    border-color: #e94560;
}

.subcategory-circle-btn:hover .circle-text {
    color: #e94560;
}

.subcategory-circle-btn.active .circle-icon {
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.5);
}

.subcategory-circle-btn.active .circle-text {
    color: #e94560;
    font-weight: 700;
}

/* ============================================
   LISTA RICETTE
   ============================================ */
.recipes-list-container {
    min-height: 300px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.recipes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    align-items: start;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    padding: 0 0.5rem;
}

.recipe-card {
    width: 100%;
    max-width: 320px;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-5px);
    border-color: #e94560;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
}

.favorite-star {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.favorite-star.active,
.favorite-star:hover {
    color: #ffd700;
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.recipe-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* FIX IMMAGINI MANCANTI */
.recipe-image img[src*="404"],
.recipe-image img[src=""] {
    display: none;
}

.recipe-image-placeholder {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.recipe-info {
    padding: 1rem;
}

.recipe-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
}

.recipe-category {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    word-break: break-word;
}

/* ============================================
   MODAL DETTAGLIO RICETTE
   ============================================ */
.modal-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border-radius: 16px;
    padding: 1rem;
    min-height: 150px;
    max-height: 200px;
}

.modal-image {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.modal-image-placeholder {
    font-size: 2.5rem;
    padding: 1rem;
    text-align: center;
}

.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredients-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
    flex-wrap: wrap;
}

.ingredients-list .ingredient-name {
    font-weight: 500;
    color: #e5e5e5;
    flex: 1;
    text-align: left;
    word-break: break-word;
}

.ingredients-list .ingredient-amount {
    font-family: monospace;
    color: #e94560;
    text-align: right;
    margin-left: 16px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .ingredients-list .ingredient-amount {
        white-space: normal;
        margin-left: 0;
        margin-top: 4px;
    }
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e94560;
    margin-bottom: 0.75rem;
    border-left: 3px solid #e94560;
    padding-left: 12px;
}

.steps-list {
    padding-left: 1.25rem;
    color: #ccc;
    line-height: 1.6;
}

/* ============================================
   MOLTIPLICATORI RICETTE
   ============================================ */
.multiplier-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.multiplier-btn {
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 30px !important;
    padding: 8px 14px !important;
    color: #ccc !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.multiplier-btn:hover {
    background: #3a3a3a !important;
    border-color: #e94560 !important;
    color: #e94560 !important;
}

.multiplier-btn.active {
    background: #e94560 !important;
    border-color: #e94560 !important;
    color: white !important;
}

.custom-multiplier {
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 30px !important;
    padding: 8px 12px !important;
    color: white !important;
    font-size: 0.85rem !important;
    width: 100px !important;
    text-align: center !important;
}

.unit-controls {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.unit-btn-inline {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 30px;
    padding: 6px 16px;
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: normal;
    word-break: break-word;
}

.unit-btn-inline:hover {
    background: #3a3a3a;
    border-color: #e94560;
    color: #e94560;
}

.unit-btn-inline.active {
    background: #e94560;
    border-color: #e94560;
    color: white;
}

/* ============================================
   FORM RICETTE
   ============================================ */
.recipe-form {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem 0;
    border: 1px solid #2a2a2a;
    max-width: 700px;
    width: 100%;
}

.recipe-form h2 {
    color: #e94560;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #e94560 !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #888;
}

.form-select option {
    background: #2a2a2a;
    color: white;
}

.form-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #2a2a2a;
    border-radius: 16px;
    border: 1px solid #3a3a3a;
}

.form-section h3 {
    color: #e94560;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Editor ingredienti e passi */
.ingredients-editor .ingredient-row,
.steps-editor .step-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    background: #1a1a1a;
    padding: 0.6rem;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    background: #1a1a1a;
    padding: 0.6rem;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.step-number {
    color: #e94560;
    font-weight: 700;
    min-width: 24px;
    font-size: 0.9rem;
}

.ingredient-row .ing-amount,
.ingredient-row .ing-unit,
.ingredient-row .ing-name,
.step-text {
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    color: white !important;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.ingredient-row .ing-amount:focus,
.ingredient-row .ing-unit:focus,
.ingredient-row .ing-name:focus,
.step-text:focus {
    border-color: #e94560 !important;
}

.ingredient-row .ing-amount {
    width: 80px;
}

.ingredient-row .ing-unit {
    width: 80px;
}

.ingredient-row .ing-name {
    flex: 1;
    min-width: 150px;
}

.step-text {
    flex: 1;
    min-width: 200px;
}

.remove-ingredient-btn,
.remove-step-btn {
    background: #e94560;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-ingredient-btn:hover,
.remove-step-btn:hover {
    background: #c72a48;
}

.add-item-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 30px;
    padding: 10px 20px;
    color: #e5e5e5;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
    width: 100%;
    white-space: normal;
    word-break: break-word;
}

.add-item-btn:hover {
    background: #1a1a1a;
    border-color: #e94560;
    color: #e94560;
}

/* Bottone Crea Nuova Ricetta - ROSSO (versione ridotta) */
.create-recipe-btn {
    background: #e94560 !important;
    border: 1px solid #e94560 !important;
    border-radius: 30px !important;
    padding: 8px 20px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.create-recipe-btn:hover {
    background: #ff6b6b !important;
    border-color: #ff6b6b !important;
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(233,69,96,0.3) !important;
}

/* Bottone Scegli Immagine nel form - ROSSO con angoli arrotondati */
.btn-choose-image {
    background: #e94560 !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 10px 20px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-choose-image:hover {
    background: #ff6b6b !important;
    transform: scale(1.02) !important;
}

.myrecipes-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    width: 100%;
}

@media (max-width: 480px) {
    .myrecipes-header {
        justify-content: center;
    }

    .create-recipe-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cancel-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #ccc;
    transition: all 0.2s;
    font-family: inherit;
}

.cancel-btn:hover {
    background: #3a3a3a;
    border-color: #e94560;
    color: #e94560;
}

.save-btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    background: #e94560;
    border: none;
    color: white;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

.save-btn:hover {
    background: #ff6b6b;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}

/* Image preview nel form */
.image-preview {
    margin-top: 0.5rem;
    position: relative;
    display: inline-block;
}

.image-preview .preview-img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #3a3a3a;
}

.image-preview button {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e94560;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.4rem 0.5rem;
    padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
    border-top: 1px solid #2a2a2a;
    z-index: 100;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    transition: all 0.2s ease;
    color: #888;
    min-height: 44px;
    justify-content: center;
}

.nav-item:hover {
    background: rgba(233, 69, 96, 0.1);
}

.nav-item.active {
    color: #e94560;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}

/* ============================================
   MODAL GENERALE
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 0.5rem;
    overflow-y: auto;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    border: 1px solid #2a2a2a;
    animation: modalFadeIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: #e94560;
}

/* ============================================
   TOOLS
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tool-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: #e94560;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.tool-desc {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
    word-break: break-word;
}

/* ============================================
   SUPER JUICE CALCULATOR - LAYOUT VERTICALE
   ============================================ */

/* Contenitore principale */
.superjuice-calculator {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #2a2a2a;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Header */
.superjuice-calculator .calculator-header {
    text-align: left;
    margin-bottom: 1.25rem;
}

.superjuice-calculator .calculator-header h3 {
    font-size: 1.2rem;
    color: #e94560;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.superjuice-calculator .calculator-header p {
    font-size: 0.83rem;
    color: #888;
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
}

/* Sezioni selector / input / unit */
.superjuice-calculator .calculator-selector,
.superjuice-calculator .calculator-unit-selector {
    margin-bottom: 1rem;
}

.superjuice-calculator .calculator-selector label,
.superjuice-calculator .calculator-unit-selector label {
    display: block;
    font-size: 0.83rem;
    color: #ccc;
    font-weight: 500;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

/* Select agrume */
.superjuice-calculator .calculator-select {
    width: 100%;
    max-width: 260px;
    padding: 0.65rem 1rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    box-sizing: border-box;
}

/* Riga input peso + bottone */
.superjuice-calculator .calculator-input {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.superjuice-calculator .calculator-input label {
    width: 100%;
    font-size: 0.83rem;
    color: #ccc;
    font-weight: 500;
    margin-bottom: 0;
    word-break: break-word;
}

.superjuice-calculator .calculator-input-field {
    flex: 1 1 100px;
    min-width: 90px;
    max-width: 160px;
    padding: 0.65rem 0.75rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    text-align: center;
    box-sizing: border-box;
}

/* Bottone calcola */
.superjuice-calculator .calculate-btn {
    flex: 1 1 90px;
    min-width: 90px;
    padding: 0.65rem 1rem;
    background: #2a2a2a;
    border: 1px solid #e94560;
    border-radius: 12px;
    color: #e94560;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.superjuice-calculator .calculate-btn:hover {
    background: #e94560;
    color: white;
}

/* Griglia risultati */
.superjuice-calculator .calculator-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Card singolo risultato - FIX per testi lunghi (tedesco) */
.superjuice-calculator .result-card {
    background: #2a2a2a;
    border-radius: 14px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    border: 1px solid #3a3a3a;
    min-width: 0;
    box-sizing: border-box;
}

.superjuice-calculator .result-label {
    font-size: 0.68rem;
    color: #888;
    display: block;
    margin-bottom: 0.35rem;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.superjuice-calculator .result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e94560;
    line-height: 1.1;
    word-break: break-word;
}

.superjuice-calculator .result-unit {
    font-size: 0.72rem;
    color: #888;
    margin-left: 2px;
}

/* Info formule */
.superjuice-calculator .calculator-info {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: #111;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.superjuice-calculator .calculator-info details summary {
    cursor: pointer;
    color: #e94560;
    font-weight: 500;
    font-size: 0.88rem;
    user-select: none;
    word-break: break-word;
}

.superjuice-calculator .calculator-info details p {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.5;
    word-break: break-word;
}

.superjuice-calculator .calculator-info ul {
    margin-left: 1.25rem;
    margin-top: 0.4rem;
}

/* Titolo sezione ricette super juice */
.superjuice-recipes {
    margin-top: 2rem;
    width: 100%;
}

.superjuice-recipes h3 {
    font-size: 1.2rem;
    color: #e94560;
    margin-bottom: 1rem;
    border-left: 3px solid #e94560;
    padding-left: 1rem;
    word-break: break-word;
}

/* ============================================
   SUPER JUICE WRAPPER - LAYOUT VERTICALE
   ============================================ */
#superjuiceWrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    gap: 1.5rem;
}

.superjuice-calculator-container {
    width: 100%;
}

/* ============================================
   CALCOLATORE COSTI
   ============================================ */
.calculator-container {
    max-width: 100%;
    overflow-x: auto;
    background: #1a1a1a;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #2a2a2a;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calculator-header h2 {
    font-size: 1.2rem;
    color: #e94560;
    margin: 0;
    word-break: break-word;
}

.currency-selector {
    display: flex;
    gap: 0.5rem;
    background: #2a2a2a;
    border-radius: 40px;
    padding: 0.25rem;
}

.currency-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: normal;
    word-break: break-word;
}

.currency-btn:hover {
    color: #e94560;
}

.currency-btn.active {
    background: #e94560;
    color: white;
}

.calculator-section {
    margin-bottom: 1.5rem;
}

.calculator-section h3 {
    font-size: 1rem;
    color: #e94560;
    margin-bottom: 0.75rem;
    border-left: 3px solid #e94560;
    padding-left: 12px;
    word-break: break-word;
}

/* Riduci dimensioni font sui box piccoli */
.calculator-section .method-chip,
.calculator-section .currency-btn,
.calculator-section .unit-btn-inline {
    font-size: 0.7rem;
    padding: 5px 8px;
}

.ingredient-row,
.extra-cost-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    padding: 0.6rem;
    background: #2a2a2a;
    border-radius: 12px;
}

.ingredient-row input,
.ingredient-row select,
.extra-cost-row input {
    padding: 6px 8px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
}

.ingredient-row .ing-name {
    flex: 2;
    min-width: 100px;
}

.ingredient-row .ing-quantity,
.ingredient-row .ing-unit,
.ingredient-row .ing-category {
    width: auto;
    min-width: 60px;
}

.bottle-info {
    display: flex;
    gap: 0.4rem;
}

.remove-btn {
    background: #e94560;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.preparation-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.method-chip {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 30px;
    padding: 5px 10px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
}

.method-chip:hover {
    background: #3a3a3a;
    border-color: #e94560;
    color: #e94560;
}

.method-chip.active {
    background: #e94560;
    border-color: #e94560;
    color: white;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.input-group label {
    width: 100px;
    color: #ccc;
    font-weight: 500;
    font-size: 0.8rem;
}

.input-group input {
    flex: 1;
    padding: 6px 8px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
}

.margin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.margin-item {
    flex: 1;
    min-width: 120px;
}

.margin-item label {
    display: block;
    margin-bottom: 0.3rem;
    color: #ccc;
    font-size: 0.75rem;
}

.margin-item input {
    width: 100%;
    padding: 6px 8px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 0.6rem;
    text-align: center;
}

.result-card .result-label {
    font-size: 0.65rem;
    color: #888;
    display: block;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.result-card .result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e94560;
    word-break: break-word;
}

.cost-breakdown {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.75rem;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #3a3a3a;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.breakdown-row.total {
    border-top: 2px solid #e94560;
    border-bottom: none;
    padding-top: 0.6rem;
    margin-top: 0.3rem;
    font-weight: bold;
}

.breakdown-label {
    color: #ccc;
    word-break: break-word;
}

.breakdown-value {
    color: #e94560;
    font-weight: 500;
    word-break: break-word;
}

.margin-warning {
    margin: 0.75rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
}

.price-suggestion {
    margin-top: 0.75rem;
    padding: 0.6rem;
    background: #2a2a2a;
    border-radius: 12px;
    font-size: 0.7rem;
    border-left: 3px solid #e94560;
}

/* ============================================
   SIDEBAR MENU
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.sidebar-overlay.open {
    visibility: visible;
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    border-left: 1px solid #2a2a2a;
}

.sidebar-overlay.open .sidebar {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #2a2a2a;
    background: linear-gradient(135deg, #e94560, #c72a48);
}

.sidebar-logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.close-sidebar {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sidebar:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e94560;
    font-weight: 600;
    word-break: break-word;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #ccc;
    font-size: 0.9rem;
    word-break: break-word;
}

.sidebar-item i {
    width: 24px;
    font-size: 1rem;
    color: #e94560;
}

.sidebar-item:hover {
    background: rgba(233, 69, 96, 0.15);
    color: white;
    padding-left: 2rem;
}

/* Bandiere sidebar */
.sidebar-flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

#currentLanguageSidebar {
    background: rgba(233, 69, 96, 0.15);
    border-radius: 12px;
    margin: 0 1rem;
}

#languageSidebarDropdown {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    margin-top: 0.5rem;
    overflow: hidden;
}

#languageSidebarDropdown .sidebar-item {
    padding: 10px 16px;
    transition: all 0.2s;
    gap: 10px;
}

#languageSidebarDropdown .sidebar-item:hover {
    background: rgba(233, 69, 96, 0.15);
    padding-left: 2rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    color: #666;
    font-size: 0.7rem;
}

/* ============================================
   ABV CALCULATOR
   ============================================ */
.abv-calculator .calculator-desc {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.abv-ingredient-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    padding: 0.6rem;
    background: #2a2a2a;
    border-radius: 12px;
}

.abv-ingredient-row input,
.abv-ingredient-row select {
    padding: 6px 8px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    color: white;
    font-size: 0.75rem;
}

.abv-ingredient-row .ing-name {
    flex: 2;
    min-width: 100px;
}

.abv-ingredient-row .ing-volume {
    width: 70px;
}

.abv-ingredient-row .ing-unit {
    width: 60px;
}

.time-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.time-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 30px;
    padding: 4px 10px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
}

.time-btn:hover {
    background: #3a3a3a;
    border-color: #e94560;
    color: #e94560;
}

.time-btn.active {
    background: #e94560;
    border-color: #e94560;
    color: white;
}

.service-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-chip {
    flex: 1;
    min-width: 100px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 8px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
}

.service-chip:hover {
    background: #3a3a3a;
    border-color: #e94560;
    color: #e94560;
}

.service-chip.active {
    background: #e94560;
    border-color: #e94560;
    color: white;
}

.service-chip small {
    font-size: 0.55rem;
    opacity: 0.7;
    display: block;
    margin-top: 0.2rem;
}

.abv-results .results-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-bottom: 80px;
    }

    /* Layout mobile:
       Riga 1: [← icona "Bartender Pro"] ——— [☰]   (dentro .logo)
       Riga 2: [search ————————————] [flag]          (dentro .header-actions)
    */
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    /* .logo occupa tutta la larghezza, hamburger spinto a destra via margin-left:auto nell'HTML */
    .logo {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
    }

    /* .header-actions: search + flag sulla riga sotto */
    .header-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    /* Search si espande ma non cresce oltre il viewport */
    .search-container {
        flex: 1 1 auto;
        min-width: 0;
    }

    .search-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    /* Blocca espansione al focus su mobile */
    .search-input:focus {
        width: 100%;
    }

    /* Cerchi categorie leggermente più piccoli su tablet/mobile */
    .category-circle .circle-icon {
        width: 85px;
        height: 85px;
    }

    /* Padding main ridotto */
    .main-content {
        padding: 0.75rem;
        padding-bottom: 80px;
    }

    /* Recipe card full width su mobile */
    .recipe-card {
        max-width: 100%;
    }

    /* Bandiera non si restringe */
    .language-selector-header {
        flex-shrink: 0;
    }

    /* Hamburger: dimensioni ridotte ma visibile */
    .menu-toggle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 1.1rem;
    }

    .categories-grid,
    .subcategories-circle {
        gap: 1rem;
    }

    .circle-icon {
        width: 75px;
        height: 75px;
    }

    .recipes-list {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .calculator-section .preparation-methods {
        gap: 0.4rem;
    }

    .calculator-section .method-chip {
        padding: 4px 8px;
        font-size: 0.65rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 0.5rem;
    }

    .result-card .result-value {
        font-size: 1rem;
    }

    .ingredient-row,
    .extra-cost-row,
    .abv-ingredient-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ingredient-row .ing-name,
    .ingredient-row .ing-quantity,
    .ingredient-row .ing-unit,
    .ingredient-row .ing-category,
    .abv-ingredient-row .ing-name,
    .abv-ingredient-row .ing-volume,
    .abv-ingredient-row select {
        width: 100%;
    }

    .service-styles {
        flex-direction: column;
    }

    .sidebar {
        width: 280px;
    }

    .modal-content {
        padding: 1rem;
    }

    .modal-image {
        max-height: 120px;
    }

    .recipe-form {
        padding: 1rem;
    }

    .multiplier-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    .unit-btn-inline {
        padding: 4px 12px;
        font-size: 0.7rem;
    }

    .superjuice-calculator .calculator-input {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
    }

    .superjuice-calculator .calculator-input-field {
        flex: 1 1 90px;
        min-width: 80px;
        max-width: 150px;
    }

    .superjuice-calculator .calculate-btn {
        flex: 1 1 90px;
        min-width: 80px;
    }

    .superjuice-calculator .calculator-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .superjuice-calculator .calculator-select {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* Header ancora più compatto */
    .app-header {
        padding: 0.5rem 0.75rem;
    }

    .logo-icon {
        width: 26px !important;
        height: 26px !important;
    }

    .menu-toggle {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 1rem;
    }

    .language-header-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .search-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* Cerchi categorie più piccoli */
    .category-circle .circle-icon {
        width: 80px;
        height: 80px;
    }

    .category-circle .circle-text {
        font-size: 0.75rem;
    }

    .subcategory-circle-btn .circle-icon {
        width: 65px;
        height: 65px;
    }

    /* Ricette in colonna singola */
    .recipes-list {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 1rem;
    }

    .recipe-card {
        max-width: 100%;
    }

    .recipe-image {
        height: 160px;
    }

    /* Modal più compatto */
    .modal-content {
        padding: 0.75rem;
        border-radius: 16px;
        margin-top: 0;
    }

    .modal-image {
        max-height: 100px;
    }

    .modal-image-wrapper {
        min-height: 110px;
        max-height: 130px;
        padding: 0.5rem;
    }

    /* Form ricette */
    .recipe-form {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .ingredient-row .ing-amount {
        width: 65px;
    }

    .ingredient-row .ing-unit {
        width: 65px;
    }

    .ingredient-row .ing-name {
        min-width: 100px;
    }

    .step-text {
        min-width: 140px;
    }

    /* Bottoni moltiplicatori */
    .multiplier-btn {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }

    .custom-multiplier {
        width: 80px !important;
    }

    /* Calcolatori */
    .result-value {
        font-size: 1.2rem;
    }

    .calculator-results:not(.superjuice-calculator .calculator-results) {
        grid-template-columns: 1fr;
    }

    .abv-results .results-grid {
        grid-template-columns: 1fr;
    }

    /* Super Juice */
    .superjuice-calculator {
        padding: 1rem;
        border-radius: 16px;
    }

    .superjuice-calculator .calculator-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .superjuice-calculator .result-value {
        font-size: 1.25rem;
    }

    .superjuice-calculator .result-card {
        padding: 0.6rem 0.35rem;
    }

    .superjuice-calculator .result-label {
        font-size: 0.62rem;
    }

    .superjuice-calculator .calculator-input-field {
        flex: 1 1 80px;
        min-width: 75px;
    }

    .superjuice-calculator .calculate-btn {
        flex: 1 1 80px;
        min-width: 75px;
        padding: 0.55rem 0.5rem;
        font-size: 0.75rem;
        white-space: normal;
        word-break: keep-all;
    }

    /* Bottom nav più piccolo */
    .nav-icon {
        font-size: 1.25rem;
    }

    .nav-label {
        font-size: 0.6rem;
    }

    .nav-item {
        padding: 0.35rem 0.5rem;
    }

    /* Sidebar più stretta */
    .sidebar {
        width: 260px;
    }
}

@media (max-width: 360px) {
    /* Header minimale */
    .app-header {
        padding: 0.4rem 0.6rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .menu-toggle {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        font-size: 0.9rem;
    }

    .language-header-btn {
        padding: 5px 8px;
    }

    /* Cerchi ancora più piccoli */
    .category-circle .circle-icon {
        width: 70px;
        height: 70px;
    }

    .category-circle .circle-text {
        font-size: 0.65rem;
    }

    .subcategory-circle-btn .circle-icon {
        width: 58px;
        height: 58px;
    }

    .subcategory-circle-btn .circle-text {
        font-size: 0.6rem;
    }

    /* Ingrediente row impilato */
    .ingredient-row .ing-amount {
        width: 55px;
    }

    .ingredient-row .ing-unit {
        width: 55px;
    }

    /* Super Juice */
    .superjuice-calculator .calculator-results {
        grid-template-columns: 1fr;
    }

    .superjuice-calculator .result-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 0.8rem;
        text-align: left;
    }

    .superjuice-calculator .result-label {
        margin-bottom: 0;
        font-size: 0.7rem;
    }

    /* Sidebar molto stretta */
    .sidebar {
        width: 240px;
    }

    /* Modal quasi fullscreen */
    .modal {
        padding: 0;
    }

    .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
        padding: 0.5rem;
    }
}

/* ============================================
   UTILITY
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b6b;
}
