/* ===========================================
   SpotDrop UI V2 - Mockup Styles
   Inspired by TikTok & Locket
   =========================================== */

/* CSS Variables - existing color palette */
:root {
    --primary: #FF6B35;
    --primary-light: #FF8F66;
    --primary-dark: #E55A2B;
    --primary-50: #FFF5F1;
    --primary-100: #FFE8DE;
    --primary-200: #FFCFBC;
    --secondary: #2EC4B6;
    --accent: #FFE66D;
    --dark: #1A1A2E;
    --dark-100: #2D2D44;
    --dark-200: #3F3F5C;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Spacing */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --nav-height: 60px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.4);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--gray-900);
}

/* App Container */
.app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===========================================
   Screen Container (for page transitions)
   =========================================== */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.screen.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

/* ===========================================
   Camera Screen - Dark Mode
   =========================================== */
.camera-screen {
    background: black;
    color: white;
    z-index: 200;
}

.camera-viewfinder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.camera-preview {
    flex: 1;
    position: relative;
    background: black;
    overflow: hidden;
}

.camera-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: calc(var(--safe-area-top) + 16px) 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.camera-top-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.camera-close-btn, .flash-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.camera-close-btn:active, .flash-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.flash-toggle.active {
    background: var(--primary);
    color: white;
}

.camera-next-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: black;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.camera-next-btn .count-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-controls {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    padding-bottom: var(--safe-area-bottom);
    background: black;
    position: relative;
}

.camera-controls-spacer {
    display: none; /* Not needed anymore */
}

.capture-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: white;
    border: 4px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-btn:active {
    transform: scale(0.9);
}

/* Counter badge inside shutter button */
.capture-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* Next button - absolutely positioned at bottom right */
.camera-next-btn {
    position: absolute;
    right: 24px;
    bottom: calc(var(--safe-area-bottom) + 40px);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border-radius: 24px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* Camera Place Indicator - Centered in top bar */
.camera-place-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Hidden by default, shown via JS as flex */
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.camera-place-indicator svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Camera photo strip for multi-capture */
.camera-photo-strip {
    position: absolute;
    bottom: 120px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px 0;
}

.camera-photo-strip::-webkit-scrollbar {
    display: none;
}

.camera-photo-strip .photo-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.camera-photo-strip .photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Done button */
.camera-done-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 24px;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    transition: all 0.2s;
}

.camera-done-btn:active {
    transform: scale(0.95);
}

.camera-side-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.camera-side-btn:active {
    transform: scale(0.9);
}

.camera-side-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main capture button */
.capture-btn-wrapper {
    position: relative;
}

.capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.capture-btn::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: white;
    transition: all 0.2s;
}

.capture-btn:active {
    transform: scale(0.95);
}

.capture-btn:active::after {
    background: var(--primary-light);
}

/* Camera switch button */
.camera-switch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.camera-switch:active {
    transform: scale(0.9) rotate(180deg);
}

/* Circle quick selector */
.circle-quick-select {
    position: absolute;
    bottom: 140px;
    left: 0;
    right: 0;
    padding: 0 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.circle-quick-select::-webkit-scrollbar {
    display: none;
}

.circle-chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.circle-chip:active,
.circle-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.circle-chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===========================================
   Feed Screen - TikTok-style Vertical Scroll
   =========================================== */
.feed-screen {
    background: var(--gray-100);
}

.feed-container {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.feed-post {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    flex-direction: column;
}

.feed-post-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.feed-post-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 20%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* Post overlay info */
.feed-post-info {
    position: absolute;
    bottom: calc(var(--nav-height) + 16px);
    left: 16px;
    right: 80px;
    z-index: 2;
}

.feed-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feed-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.feed-post-name {
    font-size: 16px;
    font-weight: 600;
}

.feed-post-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.feed-post-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.feed-post-caption {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post actions sidebar */
.feed-post-actions {
    position: absolute;
    right: 12px;
    bottom: calc(var(--nav-height) + 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 2;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.liked .action-btn-icon {
    background: var(--primary);
}

.action-btn-count {
    font-size: 12px;
    font-weight: 500;
}

/* ===========================================
   Profile Screen - Day Mode
   =========================================== */
.profile-screen {
    background: white;
    padding-top: var(--safe-area-top);
}

.profile-header {
    padding: 24px 20px;
    text-align: center;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin: 0 auto 16px;
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-handle {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-400);
}

.profile-edit-btn {
    padding: 10px 24px;
    border-radius: 24px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-edit-btn:active {
    background: var(--primary-100);
}

/* Profile grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
    overflow-y: auto;
}

.profile-grid-item {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.profile-grid-item:active {
    opacity: 0.7;
}

/* ===========================================
   Rating and Stats (based on user feedback)
   =========================================== */
.feed-post-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255, 230, 109, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.feed-post-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-likes {
    font-weight: 500;
}

/* ===========================================
   Bottom Navigation - Day Mode
   =========================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 8px;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-label {
    font-size: 10px;
    font-weight: 500;
}

/* Center camera button in nav */
.nav-camera-btn {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    margin-top: -16px;
    transition: transform 0.2s;
}

.nav-camera-btn:active {
    transform: scale(0.95);
}

/* ===========================================
   Post Preview Modal (after capture)
   =========================================== */
.preview-modal {
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 200;
    display: none;
    flex-direction: column;
}

.preview-modal.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

.preview-image-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.preview-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: calc(var(--safe-area-top) + 16px) 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.preview-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Multi-photo strip */
.photo-strip {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.photo-strip::-webkit-scrollbar {
    display: none;
}

.photo-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-photo-btn {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.add-photo-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Preview bottom actions */
.preview-actions {
    padding: 20px;
    padding-bottom: calc(var(--safe-area-bottom) + 20px);
    background: linear-gradient(0deg, var(--dark) 0%, var(--dark) 80%, transparent 100%);
}

/* Circle selector in preview */
.preview-circle-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.preview-circle-selector::-webkit-scrollbar {
    display: none;
}

/* Caption input */
.caption-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
}

.caption-input::placeholder {
    color: var(--gray-400);
}

.caption-input:focus {
    border-color: var(--primary);
}

/* Place selector */
.place-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.place-selector:active {
    background: var(--gray-200);
}

.place-selector-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.place-selector-info {
    flex: 1;
}

.place-selector-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.place-selector-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-900);
}

.place-selector-arrow {
    color: var(--gray-400);
}

/* Preview modal day mode adjustments */
.preview-modal .preview-actions {
    background: linear-gradient(0deg, white 0%, white 80%, transparent 100%);
}

.preview-modal .circle-chip {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-700);
}

.preview-modal .circle-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Post button */
.post-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.post-btn:active {
    transform: scale(0.98);
}

.post-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===========================================
   Search Screen - Day Mode
   =========================================== */
.search-screen {
    background: white;
    padding-top: var(--safe-area-top);
}

.search-header {
    padding: 16px;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

.search-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 12px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.search-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.search-item-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.search-item-info {
    flex: 1;
}

.search-item-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.search-item-meta {
    font-size: 13px;
    color: var(--gray-400);
}

/* ===========================================
   Animations
   =========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

.heart-animation {
    animation: heartBeat 0.6s ease-in-out;
}

/* ===========================================
   Responsive adjustments
   =========================================== */
@media (min-width: 768px) {
    /* Tablet mockup - center content */
    .app-container {
        max-width: 430px;
        margin: 0 auto;
        border-left: 1px solid rgba(255,255,255,0.1);
        border-right: 1px solid rgba(255,255,255,0.1);
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast notification */
.toast {
    position: fixed;
    top: calc(var(--safe-area-top) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--secondary);
}

.toast.error {
    background: #EF4444;
}

/* ===========================================
   Bottom Sheet Modal
   =========================================== */
.bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
}

.bottom-sheet.active {
    display: block;
}

.bottom-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: 12px auto;
}

.bottom-sheet-header {
    padding: 0 20px 16px;
    text-align: center;
}

.bottom-sheet-header h3 {
    font-size: 18px;
    font-weight: 600;
}

/* Place search */
.place-search-wrapper {
    position: relative;
    padding: 0 16px 16px;
}

.place-search-icon {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: -8px;
    color: var(--gray-400);
}

.place-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-900);
    font-size: 15px;
    outline: none;
}

.place-search-input:focus {
    border-color: var(--primary);
}

/* Place list */
.place-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    padding-bottom: calc(var(--safe-area-bottom) + 16px);
}

.place-list-section {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

.place-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 12px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.place-item:active {
    background: var(--gray-100);
}

.place-item-icon {
    font-size: 20px;
}

.place-item-info {
    flex: 1;
}

.place-item-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.place-item-address {
    font-size: 13px;
    color: var(--gray-500);
}

/* Place selector empty state */
.place-selector-name.place-empty {
    color: var(--gray-400);
}

.place-selector-name.place-selected {
    color: var(--gray-900);
    font-weight: 500;
}

/* Place selector required highlight */
.place-selector.required {
    border-color: var(--primary);
    background: var(--primary-50);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ===========================================
   Circles Screen
   =========================================== */
.circles-screen {
    background: white;
    padding-top: var(--safe-area-top);
}

.circles-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.circles-view.active {
    display: flex;
}

/* Circles Header */
.circles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.circles-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.create-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Circles List */
.circles-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 16px);
}

/* Circle Card */
.circle-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s;
}

.circle-card:active {
    transform: scale(0.98);
}

.circle-card-cover {
    width: 100px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.circle-card-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    max-width: 80px;
}

.circle-card-avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.circle-card-info {
    flex: 1;
    padding: 12px 16px;
    position: relative;
}

.circle-card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.circle-card-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.circle-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.circle-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

/* Circle Detail View */
.circle-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.circle-detail-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-right: 32px; /* Balance with back button */
}

.back-btn,
.circle-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Circle Tabs */
.circle-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.circle-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.circle-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.circle-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom));
}

.circle-tab-content.active {
    display: block;
}

/* Circle Posts Grid */
.circle-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
}

.circle-post-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.circle-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.circle-post-item:active img {
    transform: scale(1.05);
}

.circle-post-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.circle-post-item:active .circle-post-overlay {
    opacity: 1;
}

.circle-post-overlay span {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

/* Circle Members */
.circle-members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--gray-500);
}

.add-member-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.circle-members-list {
    padding: 0 16px;
}

.circle-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-900);
}

.member-role {
    font-size: 13px;
    color: var(--gray-500);
}

.member-badge {
    font-size: 18px;
}

.member-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ===========================================
   Enhanced Search Screen
   =========================================== */
.search-view {
    display: none;
    flex-direction: column;
    height: 100%;
}

.search-view.active {
    display: flex;
}

/* Search place items */
.search-place-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-place-item:active {
    background: var(--gray-100);
}

.place-thumb {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.search-item-friends {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.friend-avatars {
    display: flex;
}

.friend-avatars img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -6px;
}

.friend-avatars img:first-child {
    margin-left: 0;
}

.search-item-friends span {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.search-item-rating {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    flex-shrink: 0;
}

/* Place Detail View */
.place-detail-header {
    position: relative;
}

.place-detail-header .back-btn {
    position: absolute;
    top: calc(var(--safe-area-top) + 12px);
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.place-detail-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.place-cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.place-cover-overlay h1 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.place-cover-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* Place Stats */
.place-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.place-stat {
    text-align: center;
}

.place-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.place-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.see-all {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

/* Friends section */
.place-friends-list {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.place-friends-list::-webkit-scrollbar {
    display: none;
}

.place-friend-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 8px;
    background: var(--gray-100);
    border-radius: 24px;
    flex-shrink: 0;
}

.place-friend-chip img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.place-friend-chip span {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* Place posts grid */
.place-posts-section {
    padding-bottom: 80px;
}

.place-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0 2px;
}

.place-post-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.place-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.post-author-tag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Check-in button */
.checkin-btn {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 16px);
    left: 20px;
    right: 20px;
    padding: 16px;
    background: var(--primary);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    transition: transform 0.2s;
}

.checkin-btn:active {
    transform: scale(0.98);
}

/* ===========================================
   Circle Rich Posts
   =========================================== */
.circle-rich-posts {
    padding: 12px 16px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 16px);
}

.circle-rich-post {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.circle-rich-post:active {
    transform: scale(0.99);
}

.rich-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.rich-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rich-post-author {
    flex: 1;
}

.rich-post-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.rich-post-time {
    font-size: 12px;
    color: var(--gray-500);
}

.rich-post-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.rich-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rich-post-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--gray-50);
}

.rich-post-place {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rich-post-place .place-icon {
    font-size: 14px;
}

.rich-post-place .place-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.rich-post-place .place-rating {
    font-size: 12px;
    color: var(--gray-500);
    margin-left: 4px;
}

.rich-post-stats {
    font-size: 13px;
    color: var(--gray-600);
}

/* ===========================================
   Search Tabs
   =========================================== */
.search-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 16px;
}

.search-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.search-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.search-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.search-tab-content.active {
    display: block;
}

/* User Search Items */
.search-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.search-user-item .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.search-user-item .user-info {
    flex: 1;
    cursor: pointer;
}

.search-user-item .user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.search-user-item .user-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.add-friend-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-friend-btn:active {
    transform: scale(0.95);
}

.pending-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gray-200);
    border: none;
    border-radius: 20px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 500;
}

/* User Profile View */
.user-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(var(--safe-area-top) + 16px);
    border-bottom: 1px solid var(--gray-100);
}

.user-profile-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.user-profile-content {
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 20px);
    overflow-y: auto;
}

.user-profile-info {
    text-align: center;
    margin-bottom: 24px;
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--primary-100);
}

.user-profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-profile-handle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.user-profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.profile-stat {
    text-align: center;
}

.profile-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.profile-stat .stat-label {
    font-size: 12px;
    color: var(--gray-500);
}

.user-profile-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.profile-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    border: none;
    border-radius: 24px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.profile-message-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gray-100);
    border: none;
    border-radius: 24px;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* User posts grid */
.user-profile-posts {
    margin-top: 24px;
}

.user-profile-posts h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.user-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.user-post-item {
    aspect-ratio: 1;
    overflow: hidden;
}

.user-post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================================
   Emoji Star Rating
   =========================================== */
.rating-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 12px;
}

.rating-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.rating-emojis {
    display: flex;
    gap: 8px;
}

.rating-emoji {
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    filter: grayscale(0.5);
}

.rating-emoji:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.rating-emoji.active {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.rating-score {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-left: auto;
    min-width: 60px;
    text-align: center;
}

/* ===========================================
   Login Screen
   =========================================== */
.login-screen {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8F66 50%, #FFB088 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-content {
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.login-logo {
    margin-bottom: 48px;
}

.logo-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 12px;
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 8px;
}

.logo-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn.google {
    background: white;
    color: var(--gray-700);
}

.login-btn.facebook {
    background: #1877F2;
    color: white;
}

.login-btn.apple {
    background: #000;
    color: white;
}

.login-terms {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.login-terms a {
    color: white;
    text-decoration: underline;
}

/* Logout Button */
.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 24px 16px;
    padding: 14px;
    background: var(--gray-100);
    border: none;
    border-radius: 12px;
    color: #E53935;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.logout-btn svg {
    stroke: #E53935;
}

/* Circle Rating Badge */
.circle-rating-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.circle-rating-badge .circle-name {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--primary-100);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 500;
}

.circle-rating-badge .circle-score {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Profile Settings Button */
.profile-settings-btn {
    position: absolute;
    top: calc(var(--safe-area-top) + 16px);
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-settings-btn svg {
    color: var(--gray-700);
}

/* Settings Sheet */
.settings-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.settings-sheet.active {
    display: block;
}

.settings-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.settings-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    padding-bottom: calc(var(--safe-area-bottom) + 20px);
    animation: slideUp 0.3s ease;
}

.settings-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.settings-sheet-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    cursor: pointer;
}

.settings-item span {
    font-size: 15px;
    color: var(--gray-700);
}

.settings-item svg {
    color: var(--gray-500);
}

.settings-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 8px 0;
}

.settings-item.danger span {
    color: #E53935;
}

.settings-item.danger svg {
    stroke: #E53935;
}

/* Photo Delete Button */
.photo-thumb {
    position: relative;
}

.photo-delete-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #E53935;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.photo-delete-btn svg {
    stroke: white;
}

/* Preview Edit Button */
.preview-edit-btn {
    position: absolute;
    top: 0;
    right: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 0 0 0 12px;
    cursor: pointer;
}

.preview-edit-btn svg {
    color: var(--gray-700);
}

/* Circle Reviews Section */
.circle-reviews-section {
    padding-bottom: 16px;
}

.circle-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.circle-review-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.circle-review-card:active {
    background: var(--gray-50);
}

.circle-review-score {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.circle-review-score .circle-emoji {
    font-size: 24px;
}

.circle-review-score .circle-avg {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.circle-review-info {
    flex: 1;
}

.circle-review-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.circle-review-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.circle-review-avatars {
    display: flex;
}

.circle-review-avatars img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -8px;
}

.circle-review-avatars img:first-child {
    margin-left: 0;
}

/* ===========================================
   Invite Sheet Modal
   =========================================== */
.invite-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.invite-sheet.active {
    display: block;
}

.invite-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.invite-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    padding-bottom: calc(var(--safe-area-bottom) + 20px);
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.invite-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.invite-sheet-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.invite-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.invite-place-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    padding: 12px 16px;
    background: var(--primary-50);
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Schedule */
.invite-schedule {
    margin-bottom: 16px;
}

.schedule-row {
    display: flex;
    gap: 12px;
}

.schedule-item {
    flex: 1;
}

.schedule-item label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.schedule-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    background: white;
}

/* Friend Selection */
.invite-friends {
    margin-bottom: 16px;
}

.invite-section-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.invite-friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.invite-friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: 10px;
    cursor: pointer;
}

.invite-friend-item:has(input:checked) {
    background: var(--primary-50);
    border: 1px solid var(--primary);
}

.invite-friend-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.invite-friend-item span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.friend-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Message */
.invite-message {
    margin-bottom: 20px;
}

.invite-message-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
}

/* Send Button */
.invite-send-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.invite-send-btn svg {
    stroke: white;
}

/* ===========================================
   Notification / Chat Sheet
   =========================================== */
.feed-notif-btn {
    position: absolute;
    top: calc(var(--safe-area-top) + 16px);
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: white;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #E53935;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid rgba(0,0,0,0.4);
}

.notif-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
}

.notif-sheet.active {
    display: block;
}

.notif-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.notif-sheet.active .notif-sheet-backdrop {
    opacity: 1;
}

.notif-content-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
}

.notif-sheet.active .notif-content-wrapper {
    transform: translateX(0);
}

/* ===========================================
   Circle Screen Tabs & Friends View
   =========================================== */
.circles-nav-tabs {
    display: flex;
    padding: 0 16px;
    margin-bottom: 24px;
    gap: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.circle-nav-tab {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.circle-nav-tab.active {
    color: var(--gray-900);
}

.circle-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.circles-view-tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    animation: fadeIn 0.3s ease;
}

.circles-view-tab-content.active {
    display: flex;
}

/* Friends Manage View */
.friends-manage-container {
    padding: 0 16px;
    padding-bottom: 100px;
}

.friends-section {
    margin-bottom: 24px;
}

.friends-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.friends-section-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friends-section-header .badge {
    background: #FF3B30;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Friend Requests */
.friend-request-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-request-item {
    display: flex;
    gap: 12px;
    background: white;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.friend-request-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-request-info {
    flex: 1;
}

.friend-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
}

.friend-mutual {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.friend-request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.request-btn.confirm {
    background: var(--primary);
    color: white;
}

.request-btn.delete {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* My Friends List */
.my-friends-list {
    display: flex;
    flex-direction: column;
}

.my-friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.my-friend-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.my-friend-info {
    flex: 1;
}

.friend-username {
    font-size: 13px;
    color: var(--gray-500);
}

.friend-more-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
}

.add-friend-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--primary);
    cursor: pointer;
}


.notif-header {
    padding: calc(var(--safe-area-top) + 16px) 16px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-tabs {
    display: flex;
    gap: 16px;
}

.notif-tab {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-400);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.notif-tab.active {
    color: var(--gray-900);
}

.notif-tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.notif-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-50);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notif-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.notif-tab-content.active {
    display: block;
}

/* Messages */
.message-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.message-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.message-info {
    flex: 1;
    min-width: 0;
}

.message-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.message-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-900);
}

.message-time {
    font-size: 12px;
    color: var(--gray-500);
}

.message-text {
    font-size: 14px;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-item.unread .message-text {
    font-weight: 600;
    color: var(--gray-900);
}

.message-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.message-item:not(.unread) .message-status {
    display: none;
}

/* Notifications */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notif-icon.like { background: #FFEBEE; color: #EF5350; }
.notif-icon.comment { background: #E3F2FD; color: #42A5F5; }
.notif-icon.friend { background: #E8F5E9; color: #66BB6A; }

.notif-info {
    flex: 1;
}

.notif-text {
    font-size: 14px;
    color: var(--gray-800);
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-time {
    font-size: 12px;
    color: var(--gray-500);
}

.notif-post-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.notif-action-btn {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}










