:root {
    --primary: #FF4757;
    --primary-gradient: linear-gradient(135deg, #FF4757 0%, #FF6B8B 100%);
    --secondary: #2ED573;
    --bg-color: #F4F7FA;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1E293B;
    --text-light: #64748B;
    --border-color: rgba(226, 232, 240, 0.8);
    --radius: 16px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 15px 50px rgba(255, 71, 87, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background: var(--bg-color); color: var(--text-main); display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; overflow-x: hidden; transition: background 0.5s ease; }
body.login-bg { background: linear-gradient(-45deg, #fff0f2, #fce4e7, #F4F7FA, #E2E8F0); background-size: 400% 400%; animation: gradientBG 15s ease infinite; }

@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { 100% { transform: rotate(360deg); } }

.ph-spin { animation: spin 1s linear infinite; }

.glass-effect { background: var(--card-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.8); }
.fade-in { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.slide-up { animation: fadeInUp 0.3s ease-out forwards; }
.hidden { display: none !important; }

.logo-img { display: block; margin: 0 auto; object-fit: contain; }
.main-logo { max-width: 180px; margin-bottom: 10px; }
.small-logo { max-height: 35px; width: auto; margin-left: 2px; transform: scale(1.6); transform-origin: left center; transition: var(--transition); }

.screen { width: 100%; max-width: 500px; padding: 20px; display: none; margin: 0 auto; }
.screen.active { display: block; }

.auth-card { padding: 40px 30px; border-radius: 24px; box-shadow: var(--shadow-soft); margin-top: 5vh; width: 100%; }
.brand-header { text-align: center; margin-bottom: 30px; }
.subtitle { color: var(--text-light); font-size: 0.95rem; font-weight: 500; }

.auth-toggle { display: flex; background: rgba(0,0,0,0.03); border-radius: 12px; padding: 6px; margin-bottom: 25px; }
.auth-toggle button { flex: 1; padding: 12px; border: none; background: transparent; color: var(--text-light); font-weight: 600; cursor: pointer; border-radius: 8px; transition: var(--transition); }
.auth-toggle button.active { background: white; color: var(--text-main); box-shadow: 0 2px 10px rgba(0,0,0,0.05); transform: scale(1.02); }

/* AJUSTES AQUI: Seletores seguros para mobile */
.input-group { position: relative; margin-bottom: 18px; display: flex; align-items: center; width: 100%; }
.input-group > i:first-child { position: absolute; left: 16px; top: 18px; color: var(--text-light); font-size: 1.2rem; transition: var(--transition); z-index: 2; pointer-events: none; }
.input-group input, .input-group textarea { width: 100%; padding: 16px 16px 16px 48px !important; border: 2px solid var(--border-color); background: rgba(255,255,255,0.8); border-radius: var(--radius); font-size: 1rem; color: var(--text-main); transition: var(--transition); }
.input-group input:focus, .input-group textarea:focus { border-color: var(--primary); background: white; outline: none; box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1); }
.input-group:focus-within > i:first-child { color: var(--primary); }
textarea { resize: vertical; font-family: inherit; }

/* Botão do Olhinho Corrigido */
.toggle-password-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; padding: 10px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center; }
.toggle-password-btn i { font-size: 1.3rem; color: var(--text-light); transition: var(--transition); }
.toggle-password-btn:hover i { color: var(--primary); }
.input-group input[type="password"], .input-group input.password-visible { padding-right: 50px !important; }

.btn-primary { width: 100%; padding: 18px; background: var(--primary-gradient); color: white; border: none; border-radius: var(--radius); font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
.btn-primary-small { padding: 8px 16px; background: var(--primary-gradient); color: white; border: none; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.btn-primary-small:hover, .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 71, 87, 0.2); }
.btn-secondary-small { padding: 8px 16px; background: #E2E8F0; color: var(--text-main); border: none; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.btn-secondary-small:hover { background: #CBD5E1; }

.pulse-hover:hover { transform: translateY(-3px) scale(1.01); box-shadow: var(--shadow-hover); }
.btn-icon { background: white; border: 1px solid var(--border-color); color: var(--text-main); width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.3rem; cursor: pointer; transition: var(--transition); position: relative; flex-shrink: 0; }
.btn-icon:hover { background: var(--primary-gradient); color: white; border-color: transparent; }
.btn-icon-small { background: transparent; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); transition: var(--transition); display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.btn-icon-small:hover { color: var(--primary); background: rgba(255, 71, 87, 0.1); }

.btn-icon-colored { background: var(--primary-gradient) !important; color: white !important; border: none !important; box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
.btn-icon-colored:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4); }

.badge { position: absolute; top: 0; right: 0; background: var(--primary); width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; }
.badge-inline { background: var(--primary); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 10px; margin-left: 5px; }

.feed-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-radius: 20px; margin-bottom: 20px; box-shadow: var(--shadow-soft); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.feed-tabs { display: flex; background: rgba(0,0,0,0.03); border-radius: 12px; padding: 6px; margin-bottom: 15px; }
.feed-tabs button { flex: 1; padding: 12px; border: none; background: transparent; color: var(--text-light); font-weight: 600; cursor: pointer; border-radius: 8px; transition: var(--transition); }
.feed-tabs button.active { background: white; color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.filter-wrapper { margin-bottom: 25px; display: flex; justify-content: center; }
.filter-bar { background: white; border-radius: 30px; padding: 8px 20px; display: flex; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border: 1px solid var(--border-color); width: 100%; max-width: 350px; position: relative; transition: var(--transition); }
.filter-bar:hover, .filter-bar:focus-within { box-shadow: 0 8px 25px rgba(255, 71, 87, 0.1); border-color: rgba(255, 71, 87, 0.3); }
.filter-icon { color: var(--primary); font-size: 1.3rem; margin-right: 12px; }
.filter-bar input { flex: 1; border: none; background: transparent; font-size: 0.95rem; font-weight: 500; color: var(--text-main); outline: none; padding: 5px 0; cursor: pointer; }
.filter-bar input::placeholder { color: var(--text-light); }
.btn-clear-icon { background: transparent; border: none; color: var(--text-light); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); padding: 0; margin-left: 10px; }
.btn-clear-icon:hover { color: var(--primary); }

.review-card { background: white; border-radius: 20px; margin-bottom: 25px; box-shadow: 0 8px 30px rgba(0,0,0,0.04); border: 1px solid var(--border-color); transition: var(--transition); display: flex; flex-direction: column; overflow: hidden; cursor: pointer; }
.review-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: rgba(255, 71, 87, 0.2); }

.card-photo-header { width: 100%; min-height: 180px; max-height: 480px; position: relative; display: flex; justify-content: center; align-items: center; background-color: #1E293B; overflow: hidden; }
.card-photo-blur-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(25px); opacity: 0.6; z-index: 0; }
.main-photo { width: 100%; height: auto; max-height: 480px; object-fit: contain; z-index: 1; position: relative; }

.card-photo-fallback { background: var(--primary-gradient); display: flex; justify-content: flex-start; align-items: flex-end; padding: 25px; min-height: 180px; }
.fallback-content { color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.15); }

.fallback-content h4, .fallback-content h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 5px; line-height: 1.2; }
.fallback-content p { font-size: 0.85rem; opacity: 0.9; display: flex; align-items: center; gap: 5px; }

.card-photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; z-index: 2; pointer-events: none; }
.card-place-name { font-size: 1.1rem; font-weight: 800; color: white; margin-bottom: 4px; line-height: 1.2; }
.card-place-address { font-size: 0.8rem; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 4px; }

.card-content { padding: 20px; }
.card-user-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.card-user { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 700; color: var(--text-main); font-size: 0.95rem; }
.card-user i { color: var(--primary); font-size: 1.3rem; }
.card-rating { background: #FFF0F2; color: #FFC312; padding: 4px 10px; border-radius: 20px; font-size: 0.9rem; font-weight: 800; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.card-comment { font-size: 1.05rem; color: var(--text-main); line-height: 1.6; margin-bottom: 15px; word-wrap: break-word; }
.card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-light); margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); flex-wrap: wrap; gap: 10px; }

.reactions-wrapper { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-react { background: #F4F7FA; border: 1px solid transparent; padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 0.95rem; display: flex; gap: 5px; align-items: center; transition: var(--transition); }
.btn-react:hover { background: #E2E8F0; }
.btn-react.active { background: #FFE4E6; border-color: rgba(255, 71, 87, 0.3); color: var(--primary); font-weight: 600; }
.btn-add-reaction { background: white; border: 1px dashed #CBD5E1; color: var(--text-light); padding: 6px 10px; border-radius: 20px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.btn-add-reaction:hover { background: #F4F7FA; border-color: var(--primary); color: var(--primary); }

.reaction-picker { display: none; position: absolute; bottom: calc(100% + 10px); left: 0; background: white; border-radius: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); padding: 8px 12px; gap: 12px; z-index: 100; border: 1px solid var(--border-color); max-width: 260px; overflow-x: auto; scroll-behavior: smooth; }
.reaction-picker.active { display: flex; animation: slideUpPicker 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); }
.reaction-picker::-webkit-scrollbar { display: none; }
.btn-react-option { font-size: 1.5rem; background: transparent; border: none; cursor: pointer; transition: transform 0.2s; flex-shrink: 0; padding: 2px; }
.btn-react-option:hover { transform: scale(1.25); }

@keyframes slideUpPicker { from { opacity: 0; transform: translateY(15px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.single-comment-preview { background: #FAFAFA; padding: 12px 20px; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-light); display: flex; align-items: center; gap: 10px; min-height: 45px; flex-wrap: wrap; }
.animated-comment { animation: fadeIn 0.5s ease-in-out; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 400px) { .animated-comment { width: auto; max-width: 70%; } }
.single-comment-preview strong { color: var(--text-main); }
.view-all-hint { font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-left: auto; white-space: nowrap; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; backdrop-filter: blur(8px); }
.modal-content { display: flex; flex-direction: column; width: 100%; max-width: 450px; padding: 30px; border-radius: 24px; max-height: 90vh; background: white; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }

.alert-modal-content { max-width: 350px; text-align: center; padding: 40px 30px; align-items: center; }
.alert-icon-wrapper { width: 60px; height: 60px; background: rgba(255, 71, 87, 0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--primary); font-size: 2rem; margin-bottom: 20px; }
#custom-alert-message { font-size: 1.1rem; color: var(--text-main); margin-bottom: 25px; line-height: 1.5; font-weight: 600; }

#review-modal .modal-content { flex-direction: row; max-width: 850px; gap: 25px; padding: 30px; }
.modal-left { flex: 1; display: flex; flex-direction: column; }
.modal-right { flex: 1; border-radius: 16px; overflow: hidden; position: relative; min-height: 250px; display: none; background: #F4F7FA; border: 2px dashed #CBD5E1; transition: var(--transition); }
.modal-right.active { display: block; }

.upload-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; color: var(--text-light); cursor: pointer; transition: var(--transition); text-align: center; padding: 20px; }
.upload-placeholder:hover { background: rgba(255, 71, 87, 0.05); color: var(--primary); }
.upload-placeholder i { font-size: 3rem; margin-bottom: 10px; color: var(--primary); }
#btn-change-photo { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.6); color: white; border: 1px solid rgba(255,255,255,0.3); z-index: 10; }
#btn-change-photo:hover { background: var(--primary); transform: scale(1.1); }

.profile-header-banner { background: var(--primary-gradient); padding: 40px 20px 20px; border-radius: 24px 24px 0 0; text-align: center; position: relative; color: white; flex-shrink: 0; }
.profile-close-btn { position: absolute; top: 15px; right: 15px; color: white; background: rgba(0,0,0,0.1); }
.profile-close-btn:hover { background: rgba(0,0,0,0.2); color: white; }
.avatar-large { width: 80px; height: 80px; background: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--primary); font-size: 2.5rem; margin: 0 auto 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: 3px solid rgba(255,255,255,0.8); }
.profile-email { font-size: 0.85rem; opacity: 0.9; margin-top: 4px; word-break: break-all; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(5px); transition: var(--transition); }
.share-btn:hover { background: white; color: var(--primary); border-color: white; transform: scale(1.05); }

.profile-body { padding: 20px; background: white; border-radius: 0 0 24px 24px; flex: 1; overflow-y: auto; max-height: 60vh; }
.profile-tabs { display: flex; background: #F4F7FA; border-radius: 12px; padding: 4px; margin-bottom: 20px; flex-shrink: 0; overflow-x: auto; }
.profile-tabs button { flex: 1; padding: 10px; border: none; background: transparent; color: var(--text-light); font-weight: 600; cursor: pointer; border-radius: 8px; font-size: 0.85rem; transition: var(--transition); display: flex; justify-content: center; align-items: center; gap: 5px; white-space: nowrap; }
.profile-tabs button.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.users-list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding-right: 5px; }
.user-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: #FAFAFA; border: 1px solid var(--border-color); border-radius: 12px; transition: var(--transition); flex-wrap: wrap; gap: 10px; }
.user-item:hover { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.03); border-color: rgba(226, 232, 240, 1); }
.user-info-row { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; }
.user-info-row i { color: var(--primary); font-size: 1.5rem; }
.user-actions { display: flex; gap: 8px; }

.search-friend-wrapper { display: flex; gap: 10px; align-items: center; width: 100%; flex-wrap: wrap; }
.search-btn-fix { height: 54px; white-space: nowrap; }

.details-card { padding: 0; max-width: 550px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.close-details-btn { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.3); color: white; z-index: 10; border: 1px solid rgba(255,255,255,0.2); }
.close-details-btn:hover { background: var(--primary); color: white; }
.details-header { width: 100%; min-height: 200px; max-height: 480px; position: relative; display: flex; justify-content: center; align-items: center; background-color: #1E293B; flex-shrink: 0; overflow: hidden; }
.details-header-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; z-index: 2; }
.details-body { padding: 25px; overflow-y: auto; max-height: 55vh; display: flex; flex-direction: column; gap: 20px; background: white; border-radius: 0 0 24px 24px; }
.details-info { border-bottom: 1px solid var(--border-color); padding-bottom: 20px; flex-shrink: 0; }

.details-top-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.share-review-btn { width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.3rem; cursor: pointer; flex-shrink: 0; }
.friend-badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 12px; margin-left: 8px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; transition: var(--transition); border: none; cursor: pointer; white-space: nowrap; }
.friend-badge.add { background: var(--primary-gradient); color: white; box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3); }
.friend-badge.add:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4); }
.friend-badge.check { background: #E2E8F0; color: var(--secondary); cursor: default; }
.friend-badge.sent { background: #E2E8F0; color: var(--text-light); cursor: default; }

.details-comments-list { display: flex; flex-direction: column; gap: 12px; max-height: 40vh; overflow-y: auto; padding-right: 10px; margin-top: 15px; }
.comment-bubble { background: #F4F7FA; padding: 12px 15px; border-radius: 0 16px 16px 16px; font-size: 0.9rem; line-height: 1.4; word-wrap: break-word; }
.comment-bubble strong { display: block; color: var(--primary); font-size: 0.8rem; margin-bottom: 4px; }
.comment-input-row { display: flex; gap: 10px; flex-shrink: 0; }
.comment-input-row input { flex: 1; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.95rem; outline: none; background: #FAFAFA; transition: var(--transition); }
.comment-input-row input:focus { border-color: var(--primary); background: white; }
.btn-send-comment { flex-shrink: 0; background: var(--primary-gradient); color: white; border: none; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: transform 0.2s; font-size: 1.2rem; }
.btn-send-comment:hover { transform: scale(1.05); }

.star-rating-container { background: rgba(255,255,255,0.8); padding: 15px; border-radius: var(--radius); border: 2px solid var(--border-color); margin-bottom: 18px; display: flex; flex-direction: column; align-items: center; }
.rating-label { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; font-weight: 600; text-align: center; }
.star-group { display: flex; gap: 10px; position: relative; flex-wrap: wrap; justify-content: center; }
.rating-star { font-size: 2.2rem; color: #CBD5E1; cursor: pointer; transition: all 0.2s ease; position: relative; }
.rating-star.active { color: #FFC312; filter: drop-shadow(0 2px 5px rgba(255, 195, 18, 0.4)); }

.pinna-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); margin-top: 8px; padding: 10px 0; z-index: 2000; display: flex; flex-direction: column; max-height: 250px; overflow-y: auto; }
.pinna-dropdown.hidden { display: none !important; }
.pinna-dropdown-item { padding: 12px 20px; cursor: pointer; font-size: 0.95rem; color: var(--text-light); border-bottom: 1px solid rgba(0,0,0,0.03); transition: var(--transition); text-align: left; }
.pinna-dropdown-item:last-child { border-bottom: none; }
.pinna-dropdown-item:hover { background: rgba(255, 71, 87, 0.05); }
.pinna-item-main { font-weight: 700; color: var(--text-main); font-size: 1.05rem; display: block; margin-bottom: 2px; }
.pinna-item-sec { font-size: 0.85rem; }

@media (max-width: 600px) {
    .screen { padding: 10px; margin-top: 10px; }
    .auth-card { padding: 30px 20px; }
    .feed-header { flex-direction: row; align-items: center; padding: 12px 15px; flex-wrap: wrap; gap: 10px;}
    .header-actions { width: auto; gap: 8px; justify-content: flex-end; }
    .btn-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .modal { padding: 10px; align-items: flex-end; }
    .modal-content { max-height: 90vh; border-radius: 24px 24px 0 0; padding: 20px; }
    .alert-modal-content { max-height: none; border-radius: 24px; padding: 30px 20px; margin-bottom: 40vh; }
    #review-modal .modal-content { flex-direction: column; padding: 20px; gap: 15px; }
    .modal-left { order: 2; }
    .modal-right { order: 1; min-height: 180px; flex: none; }
    .search-friend-wrapper { flex-direction: column; width: 100%; }
    .search-btn-fix { width: 100%; height: 48px; }
    
    .card-photo-header, .details-header { min-height: 180px; max-height: 400px; }
    .main-photo { max-height: 400px; }
}

@media (max-width: 400px) {
    .details-top-actions { flex-direction: column; }
    .share-review-btn { align-self: flex-end; margin-top: -50px; } 
    .friend-badge { margin-left: 0; margin-top: 5px; }
}