:root {
    --primary: #B68E59;
    --primary-dark: #967347;
    --primary-light: #D9C5B2;
    --bg-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-button-idle: 0 4px 12px rgba(182, 142, 89, 0.15); /* Shadow lebih tipis saat idle */
    --shadow-button-hover: 0 15px 30px rgba(182, 142, 89, 0.35); /* Shadow kuat saat hover */
    --blur: blur(5px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
}

body {
    background-color: #fcfcfc;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

[dir="rtl"] {
    text-align: right;
}

/* Navbar Style */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* background: rgba(255, 255, 255, 0.0); */
    /* background-color: black; */
    backdrop-filter: var(--blur);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* box-shadow: 0 2px 15px rgba(0,0,0,0.0); */
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    background-color: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(182, 142, 89, 0.3);
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.lang-toggle {
    border: 1.5px solid var(--primary);
    padding: 6px 14px;
    border-radius: 25px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transform: scale(0.95);
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle:hover {
    background: rgba(182, 142, 89, 0.07);
    transform: translateY(-1px);
}

.lang-toggle:active {
    transform: scale(0.95);
    background: var(--primary);
    color: white;
}

.lang-text {
    font-size: 0.75rem;
}

/* App Header Section */
.app-container {
    padding: 5px 25px 25px 25px;
}

.app-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.app-main-icon {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fdfdfd 0%, #f5f5f5 100%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.11);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.app-info h1 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.publisher {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: block;
}

.stats-container {
    display: flex;
    justify-content: space-between;
}

.stats-row {
    height: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-top: 0px;
}

.stat-item {
    text-align: center;
    /* border-right: 1px solid #eee; */
    padding: 0px;
}

.state-grid {
    height: 55%;
    width: 1.5px;
    /* margin: 10px 0; */
    background-color: #e0e0e0;
    border-radius: 100%;
    box-sizing: border-box;
}

/* [dir="rtl"] .stat-item {
    border-right: none;
    /* border-left: 1px solid #eee;
    padding-right: 0;
    padding-left: 15px;
    padding: 0 15px;
} */

.stat-item:last-child { border: none; }

.stat-value {
    font-weight: 700;
    display: block;
    font-size: 0.96rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* Download Button */
.btn-download {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
    height: 45px;
    /* padding: 14px; */
    border-radius: 14px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    margin: 25px 0 25px 0;
    box-shadow: var(--shadow-button-idle);
    filter: brightness(1.12);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Responsive adjustment for Mobile */
@media (max-width: 600px) {
    .btn-download {
        width: 100%;
        height: 50px;
        margin: 20px auto 25px auto; /* auto left/right makes it centered */
    }
}

/* .btn-download::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
} */

/* Unified Gradient Hover and Active Effects */
.btn-download:hover {
    background-color: var(--bg-light);
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-button-hover);
    /* background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%); */
    filter: brightness(1.18);
}

/* Slight adjustment for active state to feel interactive */
.btn-download:active {
    transform: translateY(0px) scale(0.98);
    filter: brightness(0.95);
    transition: all 0.3s;
}

.btn-download:hover::after {
    left: 100%;
}

/* Popup / Modal Style */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-card {
    background: white;
    width: 90%;
    max-width: 340px;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    animation: popupIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-title {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.progress-container {
    height: 8px;
    width: 100%;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}

.btn-popup-close {
    margin-top: 25px;
    background: #f5f5f5;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s;
}

.btn-popup-close:hover { background: #eee; }

/* Screenshots */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 0 5px;
}

.sctss {
  margin-bottom: 5px
}

#title-ss {
    display: none;
}

.screenshots-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 30px 5px;
    margin: 0 -20px 10px -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshot-card {
    min-width: 130px;
    height: 250px;
    background: #eee;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.screenshot-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Description & Tags */
.card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}

.description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(182, 142, 89, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* Rating Summaries */
.rating-summary-header {
    font-size: 1.4rem;
    font-weight: 400;
    color: #555;
    margin-bottom: 15px;
}

.rating-disclaimer {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-layout {
    display: flex;
    align-items: center;
    gap: 30px;
}

.rating-score-container {
    text-align: center;
}

.big-score {
    font-size: 3.5rem;
    font-weight: 300;
    color: #333;
    line-height: 1;
}

.stars-row {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin: 10px 0;
}

.star-filled { color: var(--primary-light); }

.total-reviews {
    color: #888;
    font-size: 0.9rem;
}

.rating-bars {
    flex-grow: 1;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.bar-num { font-size: 0.8rem; width: 10px; }

.bar-bg {
    flex-grow: 1;
    height: 10px;
    background: #333;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    height: 100%;
    background: var(--primary-light);
    border-radius: 10px;
}

/* Reviews List */
.review-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

.review-user {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 5px; display: block;
}

.review-text {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* View More Button */
.view-more-container {
    padding: 15px 0;
    display: flex;
    justify-content: flex-start;
}

.btn-view-more {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
}

.btn-view-more:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* Review Input Area */
.add-review {
    margin-top: 20px;
}

textarea {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 15px;
    background: #fafafa;
    resize: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(182, 142, 89, 0.05);
}

.btn-submit {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    float: right;
    cursor: pointer;
    transition: all 0.3s;
    height: 44px; /* Explicit height to match login button */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Disabled state for submit button */
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Login Button Style */
.btn-login {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    height: 44px; /* Same height as submit button */
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px; /* Added margin bottom as requested */
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(182, 142, 89, 0.2);
}

.login-link {
    color: white;
    text-decoration: none;
}

/* Footer Style */
footer {
    margin-top: 10px;
    padding: 25px 20px;
    text-align: center;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeIn 0.6s ease forwards;
}
