
/* ================= GLOBAL RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #fafafa;
}

/* ================= NAVBAR ================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.nav-inner {
    width: 100%;
    max-width: 935px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.shop-setup-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
}

.plus-symbol {
    font-size: 22px;
    font-weight: bold;
}

.setup-label {
    font-size: 11px;
}

.nav-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-icons img {
    width: 22px;
}

.chat-label {
    font-size: 11px;
}

/* ================= CONTAINER ================= */
.container {
    max-width: 935px;
    margin: 100px auto 40px;
    padding: 0 20px;
}

/* ================= PROFILE ================= */
.profile {
    display: flex;
    gap: 40px;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0098db;
}

.profile-info {
    flex: 1;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.verified-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.follow-btn {
    background: #0098db;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.bio {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* ================= TABS ================= */
.tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    background: #fff;
}

.tab {
    padding: 15px 0;
    font-size: 13px;
    cursor: pointer;
    border-top: 2px solid transparent;
}

.tab.active {
    border-top: 2px solid black;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ================= POSTS GRID ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 10px;
}

.post-wrapper {
    display: flex;
    flex-direction: column;
}

.post {
    position: relative;
    cursor: pointer;
}

.post img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    opacity: 0;
    transition: 0.3s;
    font-weight: bold;
}

.post:hover .overlay {
    opacity: 1;
}

.post-title {
    font-size: 13px;
    padding: 8px 6px 12px;
    font-weight: 600;
    color: #222;
    text-align: left;
}

/* ================= MODAL BASE ================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 2200;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

/* ================= VIEW POST MODAL ================= */
.modal-content {
    background: #fff;
    display: flex;
    max-width: 900px;
    width: 90%;
    height: 80%;
    border-radius: 8px;
    overflow: hidden;
}

.modal-img {
    flex: 65%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 10px;
}

.modal-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-side {
    flex: 35%;
    padding: 20px;
    overflow-y: auto;
    background: #fff;
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 13px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.wa-icon {
    width: 20px;
}

/* ================= NAVIGATION ARROWS (Shared) ================= */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    z-index: 3100;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left { 
    left: 20px; 
}

.nav-arrow.right { 
    right: 20px; 
}

/* Make sure arrows are above modal content */
#modal .nav-arrow,
#screenshotModal .nav-arrow {
    z-index: 3200;
}

/* ================= CREATE POST MODAL ================= */
.create-post-box {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    animation: scaleUp 0.25s ease;
    margin: 20px;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.create-header h3 {
    margin-bottom: 6px;
    font-size: 22px;
}

.create-header p {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

/* Upload Area */
.upload-preview {
    width: 100%;
    min-height: 200px;
    border-radius: 15px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    margin-bottom: 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Upload Placeholder */
.upload-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-align: center;
    background: #f5f5f5;
    z-index: 5;
    transition: all 0.3s ease;
}

.upload-placeholder.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

/* Image Preview Container */
.image-preview-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: #fff;
    z-index: 10;
    display: none;
}

.image-preview-container.show {
    display: block !important;
}

#previewImage {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

/* Remove Image Button */
.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 20;
    border: 2px solid white;
}

.remove-image:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

#createPostModal input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin: 15px 0;
    font-size: 14px;
}

.publish-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #0098db, #006fa1);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

/* ================= SCREENSHOT MODAL ================= */
#screenshotModal {
    z-index: 3000;
}

.screenshot-modal-content {
    max-width: 90vw;
    max-height: 90vh;
}

.screenshot-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* ================= SCREENSHOTS SECTION ================= */
.screenshot-section {
    margin-bottom: 40px;
    width: 100%;
}

.screenshot-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.screenshot-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
}

.screenshot-row::-webkit-scrollbar {
    height: 4px;
}

.screenshot-row::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.screenshot-row::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.screenshot {
    flex: 0 0 auto;
    height: 420px;
    min-width: 220px;
    background: #f8f8f8;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    scroll-snap-align: start;
    overflow: hidden;
    padding: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.screenshot img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.screenshot:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* ================= APP CARD ================= */
.app-card {
    display: flex;
    align-items: left;
    gap: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 25px;
    border-radius: 20px;
    color: #fff;
    margin-top: 30px;
    width: 95%;
}

.app-icon {
    font-size: 50px;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

/* Update the app-info section */
.app-info {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0; /* Important for flexbox to allow text wrapping */
}

.app-info h3 {
    margin-bottom: 5px;
    font-size: 20px;
    white-space: normal;
}

.app-info p {
    margin-bottom: 10px;
    opacity: 0.9;
    white-space: normal;
}

.apk-link {
    color: #fff;
    word-break: break-all; /* This will break long URLs */
    font-size: 13px;
    opacity: 0.8;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
    line-height: 1.4;
}

/* ================= FOOTER ================= */
.footer {
    text-align: center;
    padding: 40px 20px 30px;
    color: #888;
    font-size: 13px;
    margin-top: 60px;
    border-top: 1px solid #eee;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
    .container { margin: 80px 0; padding: 0 15px; }
    .profile { flex-direction: column; gap: 20px; }
    .profile-img { width: 100px; height: 100px; margin: 0 auto; }
    .stats { gap: 20px; }
    
    .modal-content {
        flex-direction: column;
        height: 100%;
        width: 100%;
        border-radius: 0;
    }
    
    .modal-img { 
        height: 60%; 
        width: 100%;
    }
    
    .modal-side { 
        height: 40%; 
    }
    
    .screenshot { 
        height: 320px; 
        min-width: 180px; 
    }
    
    .nav-arrow {
        font-size: 30px;
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .nav-arrow.left { left: 5px; }
    .nav-arrow.right { right: 5px; }
    
    .create-post-box { padding: 20px; }
    .app-card { flex-direction: column; text-align: left; }
    .app-icon { margin: 0 auto; }
    .tabs { gap: 30px; }
}

@media (max-width: 480px) {
    .profile-top { flex-wrap: wrap; }
    .stats { gap: 15px; }
    .tabs { gap: 20px; }
    .tab { font-size: 12px; }
    .screenshot { height: 280px; min-width: 150px; }
}