body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.video-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    padding-bottom: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    scroll-snap-align: start;
    cursor: pointer;
    background-color: #000;
}

.video {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}

.video-info {
    position: absolute;
    bottom: 50px;
    left: 15px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.username {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.caption {
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 70px 0 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.video::-webkit-media-controls {
    display: none !important;
}

.video::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    z-index: 2;
}

.profile-section {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-right: 10px;
}

.profile-info {
    flex: 1;
}

.follow-button {
    background-color: #FE2C55;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.video-actions {
    position: absolute;
    right: 15px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 4;
}

.views-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.views-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.count {
    font-size: 14px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    cursor: pointer;
}

.action-icon {
    font-size: 28px;
    margin-bottom: 5px;
}

.action-count {
    font-size: 12px;
}

.episode-selector {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    /* display: flex; */
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.episode-count {
    color: white;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 10px;
    margin-bottom: 5px;
}

.episode-dots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.episode-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.episode-dot.active {
    background-color: #FE2C55;
    transform: scale(1.2);
}

.episode-dot-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    line-height: 1;
    cursor: default;
    margin: 0 -2px;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress {
    height: 100%;
    background-color: #FE2C55;
    width: 0%;
    transition: width 0.1s linear;
}

/* Share Modal Styles */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.share-modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #000;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    display: flex;
    gap: 10px;
}

.share-url {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.copy-button {
    background-color: #FE2C55;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.copy-button:hover {
    background-color: #e6254d;
}

/* ปรับแต่ง share button */
.share-button {
    cursor: pointer;
}

.share-button:hover {
    opacity: 0.8;
}

/* Episode Preview Styles */
.episode-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    cursor: pointer;
}

.current-episode {
    font-size: 14px;
    color: #FE2C55;
}

.episode-selector-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Episode Modal Styles */
.episode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.episode-modal.show {
    display: flex;
}

.episode-modal .modal-content {
    background-color: #1a1a1a;
    color: white;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
}

.episode-list {
    overflow-y: auto;
    max-height: 60vh;
}

.episode-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.episode-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.episode-item.active {
    background-color: rgba(254, 44, 85, 0.1);
}

.episode-item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.episode-number {
    font-size: 14px;
    color: #FE2C55;
}

.episode-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.episode-locked {
    font-size: 12px;
    color: #FE2C55;
    display: flex;
    align-items: center;
    gap: 5px;
}

.episode-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* เพิ่ม styles สำหรรับ video controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 10px;
    z-index: 3;
}

.seekbar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.seekbar {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.seekbar:hover,
.seekbar:active {
    background: rgba(255, 255, 255, 0.3);
}

.seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #FE2C55;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.seekbar:hover::-webkit-slider-thumb,
.seekbar:active::-webkit-slider-thumb {
    opacity: 1;
}

.seekbar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #FE2C55;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.seekbar:hover::-moz-range-thumb,
.seekbar:active::-moz-range-thumb {
    opacity: 1;
}

.video-time {
    color: #ffffffc9;
    font-size: 12px;
    min-width: 70px;
    text-align: right;
}

.video-time span {
    margin: 0 2px;
}

/* Footer Menu Styles */
.footer-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px;
}

.menu-item.active {
    opacity: 1;
    color: #FE2C55;
}

.menu-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.menu-text {
    font-size: 10px;
    font-weight: 500;
}

.fullscreen-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    /* margin-left: 10px; */
    opacity: 0.8;
    transition: opacity 0.3s;
}

.fullscreen-btn:hover {
    opacity: 1;
}

/* สไตล์สำหรับ fullscreen mode */
.video:fullscreen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: black;
}

.video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: black;
}

.video:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: black;
}

/* ซ่อน controls อื่นๆ ในโหมด fullscreen */
.video:fullscreen ~ .video-overlay,
.video:fullscreen ~ .video-actions,
.video:fullscreen ~ .episode-selector {
    display: none;
}

.video:-webkit-full-screen ~ .video-overlay,
.video:-webkit-full-screen ~ .video-actions,
.video:-webkit-full-screen ~ .episode-selector {
    display: none;
}

.video:-moz-full-screen ~ .video-overlay,
.video:-moz-full-screen ~ .video-actions,
.video:-moz-full-screen ~ .episode-selector {
    display: none;
}

.read-more {
    background: none;
    border: none;
    color: #999;
    padding: 0;
    margin-left: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.read-more:hover {
    color: #fff;
}

.caption-text, .caption-full {
    display: inline;
} 