@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: url('https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=2564&auto=format&fit=crop') no-repeat center center fixed; background-size: cover; color: #1a1a1a; overflow-x: hidden; }
.hidden { display: none !important; }
button, a { cursor: pointer; outline: none; border: none; background: none; text-decoration: none; }

.auth-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; }
.auth-container { width: 100%; display: flex; justify-content: center; padding: 20px; }
.glass-card { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-radius: 24px; padding: 30px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); border: 1px solid rgba(255,255,255,0.4); width: 100%; max-width: 400px; text-align: center; }

.brand-logo-img { width: 180px; max-width: 100%; height: auto; border-radius: 24px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); margin-bottom: 20px; object-fit: cover; display: inline-block; }

.app-container { max-width: 600px; margin: 0 auto; min-height: 100vh; background: rgba(255, 255, 255, 0.95); position: relative; padding-bottom: 80px; }

.glass-card h2 { font-size: 26px; font-weight: 700; color: #111; margin-bottom: 20px; }
.glass-card p { color: #666; font-size: 14px; margin-bottom: 25px; }
input { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; font-size: 14px; background: rgba(255,255,255,0.9); outline: none; transition: 0.3s; }
input:focus { border-color: #0072ff; box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.1); }

.primary-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, #00c6ff, #0072ff); color: white; border-radius: 12px; font-weight: 600; font-size: 16px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3); transition: 0.2s; }
.secondary-btn { width: 100%; padding: 15px; color: #0072ff; font-weight: 600; font-size: 15px; }
.danger-btn { width: 100%; padding: 12px; background: #ff3366; color: white; border-radius: 10px; font-weight: 600; font-size: 15px; transition: 0.2s; }
.error-msg { color: #ff3366; margin-top: 10px; font-size: 13px; }

.app-header { display: flex; justify-content: center; align-items: center; padding: 15px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 90; transition: transform 0.3s ease-in-out; }
.app-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.header-hidden { transform: translateY(-100%); }

.posts-feed { padding: 0 0 20px 0; }
.post-card { background: #fff; border-bottom: 1px solid #eee; margin-bottom: 15px; position: relative; }
.post-header { display: flex; align-items: center; padding: 12px 15px; gap: 12px; position: relative; }
.user-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0, 114, 255, 0.2); }
.post-header h4 { font-size: 14px; font-weight: 600; color: #111; display: flex; flex-direction: column; line-height: 1.2; }
.post-header h4 span { font-size: 11px; color: #888; font-weight: 400; }
.post-options-btn { position: absolute; right: 15px; color: #111; font-size: 18px; padding: 5px; }

.post-media { position: relative; background: transparent; display: block; width: 100%; }
.post-media img { width: 100%; max-height: 600px; object-fit: contain; display: block; margin: 0 auto; }
.normal-feed-video { width: 100%; max-height: 600px; object-fit: contain; }
.reel-feed-video { width: 100%; aspect-ratio: 9/16; object-fit: cover; max-height: 80vh; }
.video-click-wrapper { position: relative; width: 100%; cursor: pointer; display: flex; justify-content: center; background: #000; overflow: hidden; }

.image-grid-container { width: 100%; display: block; }
.image-grid { display: grid; gap: 2px; width: 100%; aspect-ratio: 1 / 1; background: transparent; }
.image-grid.grid-2 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr; }
.image-grid.grid-3 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.image-grid.grid-3 .grid-img-wrapper:nth-child(3) { grid-column: span 2; }
.image-grid.grid-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.image-grid.grid-6 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }

.grid-img-wrapper { position: relative; width: 100%; height: 100%; cursor: pointer; overflow: hidden; background: transparent; }
.grid-img { width: 100%; height: 100%; object-fit: cover; display: block; border: none; outline: none; }
.grid-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); color: white; display: flex; justify-content: center; align-items: center; font-size: 36px; font-weight: bold; pointer-events: none; z-index: 10; }

.media-slider-container { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.media-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; width: 100%; height: 100%; }
.media-slider::-webkit-scrollbar { display: none; }
.slider-img { flex: 0 0 100%; width: 100%; max-height: 100vh; object-fit: contain; scroll-snap-align: center; }
.slider-counter { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 14px; font-weight: 600; z-index: 20020; pointer-events: none; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.post-actions-bar { padding: 12px 15px 5px 15px; display: flex; gap: 18px; align-items: center; justify-content: flex-start; }
.like-btn, .comment-btn { font-size: 24px; color: #111; transition: 0.2s; display: flex; align-items: center; gap: 5px; }
.like-btn.liked { color: #ff3366; animation: heartBurst 0.3s forwards; }
@keyframes heartBurst { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

.post-likes-count { padding: 0 15px; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: #111; }

.post-desc-container { padding: 0 15px 15px 15px; display: flex; flex-direction: column; gap: 4px; }
.post-author { font-family: 'Arial Black', 'Impact', sans-serif; font-weight: 900; font-size: 14px; color: #111; display: block; }
.post-desc-content { font-size: 14px; color: #333; line-height: 1.6; word-wrap: break-word; white-space: pre-wrap; width: 100%; }
.desc-text { display: inline; }
.read-more-btn { color: #888; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-block; margin-left: 5px; margin-right: 5px; background: none; border: none; padding: 0; outline: none; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 600px; margin: 0 auto; background: rgba(255, 255, 255, 0.98); border-top: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-around; align-items: center; height: 60px; z-index: 9999; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { font-size: 24px; color: #a0a0a0; padding: 10px; width: 100%; text-align: center; transition: 0.3s ease; }
.nav-item.active i { background: linear-gradient(135deg, #00c6ff, #0072ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 4px rgba(0, 114, 255, 0.2)); }

.upload-page-content { padding: 20px; }
.upload-area { text-align: left; }
.upload-flex-container { display: flex; gap: 15px; margin-bottom: 20px; min-height: 150px; }
.upload-flex-container textarea { flex: 1; border: none; background: transparent; font-size: 16px; outline: none; resize: none; color: #111; padding: 10px 0; }
.preview-container { width: 90px; height: 110px; flex-shrink: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.1); background: #000; display: flex; justify-content: center; align-items: center; position: relative; }
.image-preview, .video-preview { width: 100%; height: 100%; object-fit: cover; }
.multiple-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); color: white; padding: 4px 8px; border-radius: 10px; font-weight: bold; font-size: 12px; z-index: 5; }

.file-action { border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px; }

.upload-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 15px; }
.upload-type-btn { flex: 1; min-width: 75px; padding: 10px 5px; border-radius: 12px; font-weight: 600; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: 0.2s; border: 2px solid transparent; cursor: pointer; }
.upload-type-btn i { font-size: 20px; }
.color-img { color: #27ae60; background: rgba(39, 174, 96, 0.15); }
.color-vid { color: #2980b9; background: rgba(41, 128, 185, 0.15); }
.color-reel { color: #8e44ad; background: rgba(142, 68, 173, 0.15); }
.upload-type-btn.active { border-color: currentColor; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

.publish-icon-btn { color: #0072ff; font-size: 24px; position: absolute; right: 20px; }

.profile-header-card { margin: 20px auto; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; max-width: 90%; }
.profile-avatar-wrapper { position: relative; margin-bottom: 15px; cursor: pointer; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #0072ff; padding: 3px; }
.spinner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.7); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 24px; color: #0072ff; }
.user-display-name { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 25px; }
.stats-row { display: flex; justify-content: center; width: 100%; border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05); padding: 15px 0; margin-bottom: 25px; }
.stat-box { text-align: center; }
.stat-num { display: block; font-size: 22px; font-weight: 700; color: #111; }
.logout-btn { background: rgba(255, 51, 102, 0.1); color: #ff3366; padding: 12px 30px; border-radius: 14px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; width: 100%; justify-content: center; }

.comments-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: flex-end; }
.comments-modal-content { background: #fff; width: 100%; max-width: 600px; margin: 0 auto; height: 75vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; padding: 20px 0 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.1); position: relative; }
.close-icon-btn { position: absolute; top: 15px; right: 20px; font-size: 22px; color: #555; }
.modal-title { text-align: center; font-size: 18px; font-weight: 600; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; margin-bottom: 10px; }
.comments-list { flex: 1; overflow-y: auto; padding: 0 20px; }
.comment-item { margin-bottom: 15px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.comment-item img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-text-box { background: #f0f2f5; padding: 10px 15px; border-radius: 18px; border-top-left-radius: 4px; max-width: 85%; word-wrap: break-word; display: block; text-align: start; line-height: 1.5; }
.comment-text-box strong { font-family: 'Arial Black', 'Impact', sans-serif; font-size: 13px; color: #111; margin-right: 6px; font-weight: 900; display: inline; }
.add-comment-bar { padding: 15px 20px; border-top: 1px solid #f0f0f0; display: flex; gap: 10px; align-items: center; padding-bottom: calc(15px + env(safe-area-inset-bottom)); }
.add-comment-bar input { margin: 0; background: #f0f2f5; border: none; border-radius: 20px; padding: 12px 15px; width: 100%; }
#send-comment-btn { color: #0072ff; font-size: 22px; padding: 5px 10px; }

.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 20000; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.close-lightbox { position: absolute; top: 30px; right: 20px; font-size: 24px; color: #fff; z-index: 20030; cursor: pointer; width: 44px; height: 44px; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.close-lightbox:active { transform: scale(0.9); }
.lightbox-content-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
.zoom-normal-video { width: 100%; max-height: 100vh; object-fit: contain; outline: none; }
.zoom-reel-video { width: 100%; height: 100vh; object-fit: cover; outline: none; }

.lightbox-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 20px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; z-index: 20005; display: flex; flex-direction: column; gap: 8px; }
.lightbox-user { display: flex; align-items: center; gap: 10px; }
.lightbox-user img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid white; object-fit: cover; }
.lightbox-user strong { font-family: 'Arial Black', sans-serif; font-size: 16px; }
.lightbox-desc { font-size: 14px; max-height: 120px; overflow-y: auto; text-shadow: 0 1px 3px rgba(0,0,0,0.8); word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; display: block; line-height: 1.5; width: 100%; }

.confirm-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 20000; display: flex; justify-content: center; align-items: center; }
.confirm-modal-content { background: #fff; width: 90%; max-width: 320px; padding: 25px; border-radius: 20px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.trash-icon { font-size: 40px; color: #ff3366; margin-bottom: 15px; }
.confirm-modal-content h3 { font-size: 20px; margin-bottom: 10px; color: #111; }
.confirm-modal-content p { font-size: 14px; color: #666; margin-bottom: 25px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions button { flex: 1; }
.secondary-btn-box { padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-weight: 600; color: #555; }