/* ========================================================================== */ /* Reset and Base Styles */ /* ========================================================================== */ * { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary-color: #e91e63; /* Pink */ --secondary-color: #9c27b0; /* Purple */ --dark-color: #121212; /* Dark black */ --light-dark: #1e1e1e; /* Slightly lighter black */ --text-color: #f5f5f5; /* Off-white */ --text-secondary: #b0b0b0; /* Light gray */ --card-bg: #1e1e1e; --hover-color: #ff4081; --success-color: #4caf50; --warning-color: #ff9800; --danger-color: #f44336; --border-radius: 8px; --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); --transition: all 0.3s ease; } html { scroll-behavior: smooth; } body { font-family: 'Kanit', sans-serif; background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%); color: var(--text-color); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; } .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; } /* ========================================================================== */ /* Header & Navigation */ /* ========================================================================== */ .header { background: linear-gradient(to right, var(--dark-color), var(--light-dark)); padding: 15px 0; box-shadow: var(--box-shadow); position: sticky; top: 0; z-index: 1000; } .header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; } .logo h1 { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 10px; } .logo h1 i { color: var(--secondary-color); } .logo p { font-size: 0.9rem; color: var(--text-secondary); } .search-container { flex: 1; max-width: 500px; margin: 0 20px; } .search-form { display: flex; position: relative; } .search-form input { flex: 1; padding: 12px 20px; border: none; border-radius: var(--border-radius) 0 0 var(--border-radius); background: rgba(255, 255, 255, 0.1); color: var(--text-color); font-family: 'Kanit', sans-serif; outline: none; } .search-form input::placeholder { color: var(--text-secondary); } .search-form button { padding: 12px 20px; border: none; border-radius: 0 var(--border-radius) var(--border-radius) 0; background: var(--primary-color); color: white; cursor: pointer; transition: var(--transition); } .search-form button:hover { background: var(--hover-color); } .mobile-menu-btn { display: none; background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; } .navbar { background: var(--light-dark); padding: 10px 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .nav-links { display: flex; justify-content: center; list-style: none; flex-wrap: wrap; transition: var(--transition); } .nav-links li { margin: 5px; } .nav-link { display: block; padding: 8px 16px; color: var(--text-secondary); text-decoration: none; border-radius: var(--border-radius); transition: var(--transition); font-weight: 500; } .nav-link:hover, .nav-link.active { background: var(--primary-color); color: white; } /* ========================================================================== */ /* Main Content */ /* ========================================================================== */ .main-content { flex: 1; padding: 30px 0; } .notification-bar { text-align: center; white-space: nowrap; padding: 10px 20px; border-radius: 50px; background: var(--light-dark); border: 2px solid var(--primary-color); box-shadow: inset 0 0 10px rgba(233, 30, 99, 0.4); font-size: 1.1rem; font-weight: 600; color: var(--primary-color); overflow: hidden; margin-bottom: 20px; } .notification-bar marquee { width: 100%; } .page-header-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 20px; gap: 15px; } .page-title { display: flex; align-items: center; gap: 10px; } .page-title h2 { font-size: 1.5rem; font-weight: 600; display: flex; align-items: center; gap: 10px; } .filter-controls { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; } .view-options { display: flex; gap: 5px; } .view-btn { background: var(--light-dark); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.1); width: 40px; height: 40px; border-radius: var(--border-radius); cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; } .view-btn.active, .view-btn:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); } .filter-group { display: flex; align-items: center; gap: 10px; } .filter-group label { font-weight: 500; color: var(--text-secondary); } .filter-group select { padding: 8px 12px; border-radius: var(--border-radius); border: 1px solid rgba(255, 255, 255, 0.1); background: var(--dark-color); color: var(--text-color); font-family: 'Kanit', sans-serif; outline: none; cursor: pointer; transition: var(--transition); } .filter-group select:hover { border-color: var(--primary-color); } .loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0; } .spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.1); border-radius: 50%; border-top: 5px solid var(--primary-color); animation: spin 1s linear infinite; margin-bottom: 15px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .content { display: grid; gap: 20px; margin-bottom: 30px; min-height: 500px; } .content.list-view { grid-template-columns: 1fr; } .card { background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; transition: var(--transition); box-shadow: var(--box-shadow); position: relative; cursor: pointer; } .card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); } .card-img { position: relative; width: 100%; height: 300px; overflow: hidden; } .card-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); } .card:hover .card-img img { transform: scale(1.05); } .card-badge { position: absolute; top: 10px; right: 10px; background: var(--primary-color); color: white; padding: 5px 10px; border-radius: var(--border-radius); font-size: 0.8rem; font-weight: 500; } .play-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); } .card:hover .play-overlay { opacity: 1; } .play-icon { font-size: 3rem; color: white; } .card-content { padding: 15px; } .card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .card-meta { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .card-meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-secondary); } .card-meta-item i { color: var(--primary-color); width: 16px; } .card-code { font-weight: 600; color: var(--primary-color); font-size: 1rem; } /* List View Styles */ .content.list-view .card { display: flex; height: 200px; } .content.list-view .card-img { width: 150px; height: 100%; flex-shrink: 0; } .content.list-view .card-content { flex: 1; display: flex; flex-direction: column; justify-content: center; } /* Pagination Styles */ .pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; flex-wrap: wrap; } .page-btn { padding: 10px 15px; background: var(--card-bg); border: none; border-radius: var(--border-radius); color: var(--text-color); cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 5px; font-family: 'Kanit', sans-serif; text-decoration: none; } .page-btn:hover:not(:disabled) { background: var(--primary-color); } .page-btn:disabled { opacity: 0.5; cursor: not-allowed; } .page-numbers { display: flex; gap: 5px; } .page-number { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--border-radius); background: var(--card-bg); color: var(--text-color); text-decoration: none; transition: var(--transition); font-weight: 500; } .page-number:hover, .page-number.active { background: var(--primary-color); color: white; } /* No Results */ .no-results { text-align: center; padding: 40px 0; color: var(--text-secondary); } .no-results i { margin-bottom: 15px; color: var(--primary-color); } .no-results h3 { font-size: 1.5rem; margin-bottom: 10px; } @keyframes modalopen { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } } .video-container { width: 100%; position: relative; } #video-player { width: 100%; height: auto; max-height: 70vh; background: #000; border-radius: var(--border-radius); } .video-info { padding: 15px 0; } .video-info h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--primary-color); } .video-meta { display: flex; gap: 15px; flex-wrap: wrap; color: var(--text-secondary); } /* ========================================================================== */ /* Footer */ /* ========================================================================== */ .footer { background: var(--dark-color); padding: 40px 0 20px; margin-top: auto; } .footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 30px; } .footer-section h3 { color: var(--primary-color); margin-bottom: 15px; font-size: 1.2rem; } .footer-section p { color: var(--text-secondary); line-height: 1.6; } .footer-section ul { list-style: none; } .footer-section ul li { margin-bottom: 10px; } .footer-section ul li a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); } .footer-section ul li a:hover { color: var(--primary-color); } .footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-secondary); font-size: 0.9rem; } /* ========================================================================== */ /* Utility Classes & Scrollbar */ /* ========================================================================== */ .hidden { display: none !important; } .text-center { text-align: center; } .text-primary { color: var(--primary-color); } ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--dark-color); } ::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: var(--hover-color); } /* Styles for the "Back to Home" button */ .back-btn { display: inline-flex; /* ใช้ inline-flex เพื่อให้ปุ่มมีความกว้างตามเนื้อหาเท่านั้น */ align-items: center; gap: 8px; /* เพิ่มระยะห่างระหว่างไอคอนและข้อความ */ padding: 10px 15px; background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--border-radius); color: var(--text-color); text-decoration: none; font-weight: 500; transition: var(--transition); margin-bottom: 20px; } .back-btn:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); } /* พื้นหลังเบลอเวลาโหลด */ body.loading #main-content-wrapper, body.loading header, body.loading footer { filter: blur(6px); pointer-events: none; /* กันกดคลิก */ user-select: none; } /* กล่องโหลด */ .main-loading-page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; } .main-loading-page.hidden { display: none; } /* สปินเนอร์ */ .spinner { width: 50px; height: 50px; border: 5px solid #ccc; border-top-color: #ff3366; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; } @keyframes spin { to { transform: rotate(360deg); } }