* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: rgba(2, 101, 114, 0.959);
    --secondary-color: rgba(2, 101, 114, 0.959);
    --accent-color: #FF9800;
    --danger-color: #f44336;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

html, body {
    height: 100%;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
}

/* Allow scrolling on submit page */
html.submit-page, body.submit-page {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: 'Tahoma', 'Arial', 'Segoe UI', 'Vazir', 'Iranian Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    padding: 0;
    direction: rtl;
    text-align: right;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Allow direction to change when user selects English */
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

/* Allow normal vertical scrolling on submit page */
body.submit-page {
    position: relative;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

body.submit-page .submit-container {
    min-height: 0;
    padding-top: var(--header-height, 120px);
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
    height: auto;
}

/* Fixed Menu at Top */
.fixed-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
}

.menu-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* Info counter badge - top left of header */
.info-counter {
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    color: var(--primary-color);
    padding: 4px 10px;
    font-size: 0.85em;
    font-weight: 600;
    font-family: monospace;
    z-index: 1001;
    direction: ltr;
    min-width: 60px;
    text-align: center;
}

.menu-content h1 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 5px;
}

.menu-content .subtitle {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 8px 0;
}

.version-number {
    color: #999;
    font-size: 0.75em;
    font-weight: normal;
    margin-right: 5px;
    font-family: monospace;
}

.lang-selector {
    display: flex;
    flex-shrink: 0;
}
.lang-btn {
    padding: 4px 12px;
    font-size: 0.85em;
    border: 1px solid rgba(2, 101, 114, 0.959);
    background: rgba(2, 101, 114, 0.959);
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.lang-btn:hover {
    background: rgba(2, 85, 95, 0.959);
}

.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.category-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9em;
}

.category-filter label {
    color: #555;
}

#category-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.9em;
    background: #fff;
    min-width: 0;
    max-width: 100%;
}

.header-submit-btn {
    padding: 4px 12px;
    font-size: 0.85em;
    white-space: nowrap;
    flex-shrink: 0;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

/* Constrain width on wide screens to mimic mobile appearance (like TikTok/Instagram) */
@media (min-width: 769px) {
    body {
        background: #e5e5e5;
    }
    
    .container {
        max-width: 450px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
        background: var(--bg-color);
        position: relative;
    }
    
    .fixed-menu {
        max-width: 450px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 450px;
    }
    
    .info-container {
        max-width: 450px;
    }
    
    .info-card {
        max-width: 450px;
        padding-top: var(--header-height, 140px);
    }
    
    /* Submit page also constrained */
    .submit-container {
        max-width: 450px;
        margin: 0 auto;
    }
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: var(--secondary-color);
}

.submit-container {
    padding-top: var(--header-height, 120px);
    padding-left: 20px;
    padding-right: 20px;
    height: auto;
    box-sizing: border-box;
}

.more-info-banner {
    max-width: 700px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 8px;
    color: #1565c0;
}

.submit-form {
    max-width: 700px;
    margin: 0 auto 40px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 12px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.95em;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.submit-note {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 12px;
    line-height: 1.4;
}

.captcha-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-help {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

.media-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.media-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
}

.media-preview-item img,
.media-preview-item video {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.media-preview-name {
    flex: 1;
    font-size: 0.85em;
    color: var(--text-color);
    word-break: break-word;
}

.media-remove-btn {
    padding: 4px 8px;
    font-size: 0.75em;
    background: var(--danger-color);
    color: white;
}

.media-remove-btn:hover {
    background: #d32f2f;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
}

.media-input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 10px;
}

.media-upload-section,
.media-url-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-upload-label {
    font-size: 0.9em;
    font-weight: normal;
    margin-bottom: 4px;
}

.media-urls-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.media-url-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9em;
}

.media-url-remove {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
}

.media-url-remove:hover {
    background: #d32f2f;
}

#add-media-url {
    margin-top: 4px;
}

.media-preview-url {
    padding: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    word-break: break-all;
    font-size: 0.85em;
    color: var(--text-color);
}

.media-preview-error {
    padding: 8px;
    background: #ffebee;
    color: #c62828;
    border-radius: 4px;
    font-size: 0.85em;
    text-align: center;
}

.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.social-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
}

.social-link-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9em;
    min-width: 150px;
    font-family: inherit;
}

.social-link-select option {
    padding: 4px 8px;
    font-family: inherit;
}

.social-link-url {
    flex: 2;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9em;
}

.social-link-remove {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
}

.social-link-remove:hover {
    background: #d32f2f;
}

#add-social-link {
    margin-top: 8px;
}

.captcha-container img {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: block;
    width: 150px;
    height: 50px;
    flex-shrink: 0;
}

.btn-small {
    font-size: 0.85em;
    padding: 4px 8px;
    flex-shrink: 0;
}

.captcha-container input[type="text"],
.captcha-container input[type="number"],
.captcha-answer {
    flex: 1;
    min-width: 70px;
    max-width: 70px;
    height: 50px;
    line-height: 50px;
    box-sizing: border-box;
}

.form-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-bottom: 20px;
}

.info-container {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    position: relative;
    max-width: 100%;
}

.info-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Disable scroll-snap on iOS Safari only - fixes auto-scroll down bug. iOS Chrome keeps snap. */
.ios-safari .info-container {
    scroll-snap-type: none;
}
.ios-safari .info-card {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

/* Buffer debug info - top of screen for debugging */
.buffer-debug {
    position: fixed;
    top: var(--header-height, 140px);
    left: 0;
    right: 0;
    z-index: 9998;
    padding: 6px 12px;
    background: rgba(2, 101, 114, 0.9);
    color: #fff;
    font-size: 0.85em;
    font-family: monospace;
    white-space: normal;
    overflow-x: visible;
    pointer-events: auto;
    user-select: none;
}

/* Scroll end indicators - transparent overlay in center-top */
.scroll-end-indicator {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9em;
    text-align: center;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    min-width: 200px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-end-indicator.show {
    opacity: 1;
}

.scroll-end-top {
    top: 100px;
}

.scroll-end-bottom {
    top: 100px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    margin: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--header-height, 160px);
    box-sizing: border-box;
    max-height: 100vh;
    max-height: 100dvh;
}


 .info-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 26vh;
    min-height: 160px;
    max-height: 280px;
    overflow: hidden;
}

/* Media gallery navigation dots */
.media-gallery-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.media-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.media-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 3px;
}

.media-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Scroll indicators (arrows) */
.media-scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    visibility: hidden;
}

.media-scroll-indicator[style*="opacity: 1"],
.media-scroll-indicator[style*="opacity:1"] {
    pointer-events: auto !important;
    visibility: visible !important;
}

.media-scroll-indicator:hover {
    background: rgba(0, 0, 0, 0.7);
}

.media-scroll-left {
    left: 8px;
}

.media-scroll-right {
    right: 8px;
}

/* Show indicators on hover or when scrollable */
.info-image-wrapper:hover .media-scroll-indicator {
    pointer-events: auto;
}

/* Make indicators more visible on mobile */
@media (max-width: 768px) {
    .media-scroll-indicator {
        width: 40px;
        height: 40px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Fade gradients on edges to indicate scrollability */
.info-media-gallery::before,
.info-media-gallery::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.info-media-gallery::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
}

.info-media-gallery::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
}

.info-media-gallery.scrollable-left::before {
    opacity: 1;
}

.info-media-gallery.scrollable-right::after {
    opacity: 1;
}

.info-media-gallery {
    display: flex;
    flex-direction: row;
    gap: 0;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.info-media-gallery::-webkit-scrollbar {
    height: 4px;
}

.info-media-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.info-media-gallery::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 2px;
}

.info-media-item-wrapper {
    width: 100%;
    height: 100%;
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 101, 114, 0.959);
}

.info-media-item {
    width: auto;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 160px;
    max-height: 280px;
    background: rgba(2, 101, 114, 0.959);
    color: rgba(255, 255, 255, 0.8);
}

.info-media-empty-text {
    font-size: 0.9em;
    text-align: center;
    padding: 20px;
}

.info-image {
    width: 80%;
    height: 26vh;
    min-height: 160px;
    max-height: 280px;
    object-fit: cover;
    background: rgba(2, 101, 114, 0.959);
    flex-shrink: 0;
}

.info-content {
    padding: 12px 15px 0 15px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.info-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--text-color);
    line-height: 1.3;
    flex-shrink: 0;
}

.info-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    z-index: 2;
}

.info-description {
    color: #666;
    margin-bottom: 8px;
    flex: 1 1 auto;
    font-size: 1.05em;
    line-height: 1.5;
    overflow-y: auto;
    min-height: 0;
    flex-shrink: 1;
}

.info-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    flex-shrink: 0;
    padding: 6px 15px calc(8px + env(safe-area-inset-bottom, 0)) 15px;
    background: var(--card-bg);
    position: sticky;
    bottom: 0;
    z-index: 10;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.rating-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
    flex-wrap:nowrap;
}

.rating-section.rating-submitting {
    opacity: 0.7;
    cursor: wait;
}

.confirm-stars-section,
.reject-stars-section {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.stars-label {
    font-weight: 500;
    min-width: 45px;
    font-size: 1em;
    white-space: nowrap;
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.2s;
    filter: grayscale(100%);
    opacity: 0.4;
    line-height: 1;
}

.star:hover {
    transform: scale(1.2);
    opacity: 0.7;
}

.star-green {
    color: #4CAF50;
}

.star-red {
    color: #f44336;
}

.star-green.active {
    filter: grayscale(0%);
    opacity: 1;
    color: #4CAF50;
}

.star-red.active {
    filter: grayscale(0%);
    opacity: 1;
    color: #f44336;
}

.star-green:hover {
    filter: grayscale(0%);
    opacity: 0.8;
    color: #4CAF50;
}

.star-red:hover {
    filter: grayscale(0%);
    opacity: 0.8;
    color: #f44336;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.2;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: rgba(2, 85, 95, 0.959);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Submit button loading spinner */
.btn-submitting {
    position: relative;
    min-width: 80px;
    color: transparent !important;
    pointer-events: none;
    background: var(--primary-color) !important; /* keep green during load */
}

.btn-submitting .btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Full overlay spinner for submit page - always visible */
.submit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.submit-overlay-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

.submit-overlay-text {
    color: #fff;
    margin-top: 16px;
    font-size: 1.1em;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: rgba(2, 85, 95, 0.959);
}

.comments-section {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.comments-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.comments-header .btn-more-info {
    flex-shrink: 0;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.comment-item {
    background: var(--bg-color);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.comment-text {
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 0.8em;
    color: #999;
}

.comment-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 4px 0 3px;
    flex-shrink: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    font-size: 0.65em;
    color: #555;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--bg-color);
    transform: translateY(-1px);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.75em;
}

.social-name {
    white-space: nowrap;
}

.social-facebook .social-icon { background: #1877F2; }
.social-instagram .social-icon { background: #E1306C; }
.social-twitter .social-icon { background: #000000; }
.social-linkedin .social-icon { background: #0A66C2; }
.social-youtube .social-icon { background: #FF0000; }
.social-tiktok .social-icon { background: #000000; }
.social-telegram .social-icon { background: #26A5E4; }
.social-whatsapp .social-icon { background: #25D366; }
.social-snapchat .social-icon { background: #FFFC00; color: #000; }
.social-pinterest .social-icon { background: #E60023; }
.social-reddit .social-icon { background: #FF4500; }
.social-github .social-icon { background: #24292F; }
.social-email .social-icon { background: #666666; }
.social-website .social-icon { background: #4CAF50; }

.rating-stats {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 4px 8px;
    background: var(--bg-color);
    border-radius: 6px;
    font-size: 1em;
    flex-shrink: 0;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-confirm {
    color: #4CAF50;
}

.stat-reject {
    color: #f44336;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

/* Media Lightbox - fullscreen zoom on click */
.media-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.media-lightbox.active {
    display: flex;
}

.media-lightbox-scroll {
    flex: 1;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: default;
}

.media-lightbox-scroll::-webkit-scrollbar {
    height: 8px;
}

.media-lightbox-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.media-lightbox-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.media-lightbox-track {
    display: flex;
    height: 100%;
    min-width: min-content;
}

.media-lightbox-item {
    flex: 0 0 100%;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.media-lightbox-media {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

.media-lightbox-close {
    position: absolute;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.media-lightbox-close-top {
    top: 20px;
    inset-inline-end: 20px;
    left: 80%;
}

.media-lightbox-close:not(.media-lightbox-close-top) {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.info-media-item-wrapper {
    cursor: pointer;
}

/* Terms acceptance modal */
.terms-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terms-modal.active {
    display: flex;
}

.terms-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.terms-modal-dialog {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terms-modal-title {
    padding: 20px 24px 8px;
    font-size: 1.25rem;
    margin: 0;
    flex-shrink: 0;
}

.terms-modal-intro {
    padding: 0 24px 16px;
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    flex-shrink: 0;
}

.terms-modal-links {
    padding: 0 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terms-modal-links .terms-full-link {
    margin: 0;
    display: inline-block;
}

.terms-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 16px;
}

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

.terms-section-fa {
    text-align: right;
}

.terms-collapsible {
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.terms-collapsible summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    background: #f9f9f9;
    list-style: none;
}

.terms-collapsible summary::-webkit-details-marker {
    display: none;
}

.terms-collapsible summary::before {
    content: '▾';
    display: inline-block;
    margin-inline-end: 8px;
    transition: transform 0.2s;
}

.terms-collapsible[open] summary::before {
    transform: rotate(180deg);
}

.terms-section-fa .terms-collapsible summary::before {
    margin-inline-end: 0;
    margin-inline-start: 8px;
}

.terms-collapsible[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.terms-collapsible > *:not(summary) {
    padding: 12px 14px;
}

.terms-collapsible p {
    margin: 0 0 8px;
}

.terms-collapsible p:last-child {
    margin-bottom: 0;
}

.terms-section h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--primary-color);
}

.terms-section h4 {
    font-size: 0.95rem;
    margin: 18px 0 6px;
    color: var(--primary-color);
}

.terms-section p {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.terms-section a {
    color: var(--primary-color);
}

.terms-modal-actions {
    padding: 16px 24px 24px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
}

.terms-full-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-inline-end: 16px;
}

.terms-full-link:hover {
    text-decoration: underline;
}

.terms-accept-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 15px 25px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    box-shadow: var(--shadow-hover);
    display: none;
    z-index: 2000;
    animation: slideInRTL 0.3s ease;
}

@keyframes slideInRTL {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--accent-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-top: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .info-card {
        padding-top: var(--header-height, 140px);
    }

    .info-image-wrapper {
        height: 24vh;
        min-height: 140px;
        max-height: 240px;
    }

    .rating-section {
        flex-wrap: wrap;
        gap: 6px;
    }

    .info-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0)) 12px;
    }

    .menu-content h1 {
        font-size: 1.5em;
    }

    .menu-content .subtitle {
        font-size: 0.85em;
    }

    .fixed-menu {
        padding: 12px 15px;
    }

    .header-actions {
        gap: 8px;
    }

    .lang-btn,
    .header-submit-btn {
        padding: 4px 10px;
        font-size: 0.8em;
    }

    .header-icon-button {
        padding: 4px 8px;
        font-size: 0.9em;
    }

    #category-select {
        padding: 3px 6px;
        font-size: 0.8em;
        max-width: 110px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.3em;
    }
    
    .menu-header {
        gap: 10px;
    }

    .info-container {
        gap: 0;
        padding: 0;
    }

    .info-image {
        height: 250px;
    }

    .score-section,
    .confirm-section {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .menu-content h1 {
        font-size: 1.3em;
    }

    .menu-content .subtitle {
        font-size: 0.8em;
    }

    .fixed-menu {
        padding: 10px 12px;
    }

    .header-actions {
        gap: 6px;
    }

    .lang-btn,
    .header-submit-btn {
        padding: 3px 8px;
        font-size: 0.75em;
    }

    .header-icon-button {
        padding: 3px 6px;
        font-size: 0.85em;
    }

    #category-select {
        padding: 2px 4px;
        font-size: 0.75em;
        max-width: 85px;
    }

    .info-card {
        padding-top: var(--header-height, 130px);
    }

    .info-image-wrapper {
        height: 22vh;
        min-height: 120px;
        max-height: 200px;
    }

    .info-content {
        padding: 8px 12px 0 12px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
    }
    
    .info-image {
        height: 22vh;
        min-height: 120px;
        max-height: 200px;
    }
    
    .info-actions {
        padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0)) 10px;
        margin-top: 4px;
        gap: 4px;
    }

    .rating-section {
        gap: 4px;
    }

    .stars-label {
        min-width: 38px;
        font-size: 0.95em;
    }

    .star {
        font-size: 1.25em;
    }
    
    .comments-section {
        margin-top: 2px;
        padding-top: 4px;
    }
    
    .comments-header {
        margin-bottom: 4px;
        font-size: 0.8em;
    }
    
    .comments-header strong {
        font-size: 0.85em;
    }
    
    .comments-header .btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }

    .btn {
        
        font-size: 0.9em;
    }
    
    /* Submit page mobile adjustments */
    body.submit-page .submit-container {
        padding-top: var(--header-height, 100px);
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 30px;
    }
    
    .submit-form {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        margin-bottom: 3px;
        font-size: 0.85em;
    }
    
    .form-group input[type="text"],
    .form-group input[type="url"],
    .form-group select,
    .form-group textarea {
        padding: 6px 8px;
        font-size: 0.9em;
    }
    
    .form-group textarea {
        min-height: 80px;
    }
    
    .submit-note {
        margin-bottom: 10px;
        font-size: 0.8em;
    }
    
    .form-buttons {
        gap: 6px;
        margin-top: 12px;
        padding-bottom: 30px;
    }
    
    .form-buttons .btn {
        flex: 1 1 auto;
        min-width: 120px;
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .captcha-container {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .captcha-container img {
        width: 120px;
        height: 40px;
    }
}

/* Search icon button in header */
.header-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    font-size: 0.9em;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-width: auto;
    line-height: 1;
    flex-shrink: 0;
}

/* Search dialog inside modal */
.search-dialog {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.search-dialog-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95em;
}

.search-dialog-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Search results grid inside modal */
.search-results-wrapper {
    max-height: 60vh;
    overflow: auto;
    margin-top: 10px;
}

.search-results-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.search-results-grid thead {
    background: #f0f0f0;
}

.search-results-grid th,
.search-results-grid td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    text-align: start;
}

html[dir="rtl"] .search-results-grid th,
html[dir="rtl"] .search-results-grid td {
    text-align: right;
}

.search-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-row:hover {
    background: rgba(0, 0, 0, 0.04);
}

.search-cell-description {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
}
