:root { --primary-color: #9c27b0; --card-hover-shadow: rgba(0, 0, 0, 0.15); } * { box-sizing: border-box; } body { font-family: 'Vazirmatn', sans-serif; margin: 0; background: #f5f5f5; overscroll-behavior: contain; } /* ======= فهرست کارت‌های کانال ======= */ .tv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; padding: 12px; max-width: 1200px; margin: auto; } @media (max-width: 600px) { .tv-list { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; } } .tv-card { background: #333; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; } .tv-card:hover, .tv-card:focus-within { transform: scale(1.02); box-shadow: 0 8px 20px var(--card-hover-shadow); } .tv-card.active { border: 3px solid var(--primary-color); } .tv-card:focus { outline: 3px solid var(--primary-color); outline-offset: 2px; } .tv-card img.tv-thumb { width: 80%; height: auto; object-fit: contain; } .tv-card .tv-text { color: #fff; font-size: 14px; text-align: center; line-height: 1.2; width: 80%; display: flex; align-items: center; justify-content: center; } /* ======= پنجرهٔ پاپ‌آپ ======= */ .tv-popup-box { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(20, 20, 20, 0.92); z-index: 9999; overflow: hidden; } .tv-popup-box[aria-hidden="false"] { display: block; } .tv-popup-content { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; } /* ======= بخش ویدئو ======= */ .video-container { position: relative; width: 100%; background: black; overflow: hidden; flex: 1; display: flex; align-items: center; justify-content: center; } @media (max-width: 600px) { .video-container { height: 60vh; flex: none; } } .video-placeholder { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: opacity 0.4s ease; } .video-placeholder.hidden { opacity: 0; pointer-events: none; } .video-placeholder::after { content: ""; width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } #tvVideo { width: 100%; height: 100%; object-fit: contain; background: black; opacity: 0; transition: opacity 0.4s ease; } /* برچسب پخش */ .overlay-info { position: absolute; bottom: 60px; left: 12px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 16px; padding: 6px 10px; border-radius: 4px; z-index: 1002; transition: all 0.3s ease; } @media (max-width: 600px) { .overlay-info { bottom: 55px; font-size: 14px; padding: 4px 8px; } } /* نوار کنترل */ .controls { position: absolute; bottom: 12px; left: 12px; display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, 0.6); padding: 6px; border-radius: 4px; z-index: 1003; } .controls button { background: none; border: none; color: white; font-size: 20px; cursor: pointer; padding: 4px; } @media (max-width: 600px) { .controls { gap: 6px; padding: 4px; } .controls button { font-size: 18px; padding: 3px; } } .controls button:focus { outline: 2px solid #fff; outline-offset: 2px; } .controls .seek-bar { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; position: relative; cursor: pointer; margin: 0 4px; } .controls .seek-bar .progress { height: 100%; background: var(--primary-color); width: 0%; border-radius: 2px; } /* پیام Fallback */ .fallback-message { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 14px; background: rgba(0, 0, 0, 0.7); padding: 6px 10px; border-radius: 4px; z-index: 1002; display: none; text-align: center; } .fallback-message.show { display: block; } .fallback-message button { margin-top: 8px; background: var(--primary-color); color: #fff; border: none; padding: 4px 8px; border-radius: 3px; cursor: pointer; } .fallback-message button:focus { outline: 2px solid #fff; outline-offset: 2px; } /* دکمه بستن */ .close-btn { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.8); color: white; border: none; font-size: 20px; width: 32px; height: 32px; border-radius: 4px; display: flex; align-items: center; justify-content: center; z-index: 1004; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; } .close-btn:hover { background: rgba(156, 39, 176, 0.8); transform: scale(1.1); } .close-btn:focus { outline: 2px solid #fff; outline-offset: 2px; } @media (max-width: 600px) { .close-btn { font-size: 18px; width: 28px; height: 28px; top: 8px; right: 8px; } } /* نوار اسکرولی کف صفحه */ .tv-scroll-list { display: flex; justify-content: flex-start; overflow-x: auto; background: #222; padding: 10px 0; gap: 8px; border-top: 1px solid #444; width: 100%; box-sizing: border-box; flex: 0 0 auto; } .tv-scroll-item { width: 60px; height: 40px; background: #555; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 6px; flex: 0 0 auto; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s, transform 0.2s; display: flex; align-items: center; justify-content: center; position: relative; } .tv-scroll-item:hover, .tv-scroll-item:focus { transform: scale(1.05); } .tv-scroll-item.active { border-color: var(--primary-color); } .tv-scroll-item:focus { outline: 2px solid var(--primary-color); outline-offset: 2px; } .tv-scroll-item .tv-scroll-text { color: #fff; font-size: 10px; text-align: center; line-height: 1.2; padding: 2px; }