/* ZorgvWatch CSS - YouTube 2007 Style with Player Integration */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    background-color: #FFFFFF;
    color: #333333;
    line-height: 1.4;
}

/* Header */
#header {
    background: linear-gradient(to bottom, #2E7D32 0%, #1B5E20 100%);
    border-bottom: 1px solid #0D3B0D;
    height: 60px;
    position: relative;
}

#header-content {
    max-width: 980px;
    margin: 0 auto;
    height: 100%;
    position: relative;
    padding: 0 10px;
}

#logo {
    float: left;
    padding: 15px 0;
}

#logo h1 {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: -1px;
}

#logo a {
    color: #FFFFFF;
    text-decoration: none;
}

#search-container {
    float: left;
    margin-left: 40px;
    margin-top: 18px;
}

#search-input {
    width: 300px;
    height: 22px;
    padding: 2px 5px;
    border: 1px solid #999999;
    font-size: 12px;
}

#search-button {
    height: 26px;
    padding: 2px 12px;
    background: linear-gradient(to bottom, #FFFFFF 0%, #E6E6E6 100%);
    border: 1px solid #999999;
    cursor: pointer;
    font-size: 11px;
    margin-left: 5px;
}

#search-button:hover {
    background: linear-gradient(to bottom, #F0F0F0 0%, #D0D0D0 100%);
}

#user-links {
    float: right;
    padding: 20px 0;
    color: #FFFFFF;
    font-size: 11px;
}

#user-links a {
    color: #FFFFFF;
    text-decoration: none;
}

#user-links a:hover {
    text-decoration: underline;
}

/* Main Container */
#main-container {
    max-width: 980px;
    margin: 0 auto;
    background-color: #FFFFFF;
    min-height: 600px;
    display: flex;
}

/* Sidebar */
#sidebar {
    width: 180px;
    background-color: #F5F5F5;
    border-right: 1px solid #CCCCCC;
    padding: 10px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    background: linear-gradient(to bottom, #E6E6E6 0%, #CCCCCC 100%);
    border: 1px solid #999999;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 5px;
}

.sidebar-section ul {
    list-style: none;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

.sidebar-section li {
    border-bottom: 1px solid #EEEEEE;
}

.sidebar-section li:last-child {
    border-bottom: none;
}

.sidebar-section a {
    display: block;
    padding: 5px 8px;
    color: #0066CC;
    text-decoration: none;
    font-size: 11px;
}

.sidebar-section a:hover {
    background-color: #F0F0F0;
    text-decoration: underline;
}

/* Content Area */
#content {
    flex: 1;
    padding: 15px 20px;
    background-color: #FFFFFF;
}

/* Video Grid */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.video-item {
    width: 150px;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 8px;
    cursor: pointer;
}

.video-item:hover {
    background-color: #F5F5F5;
    border-color: #999999;
}

.video-thumbnail {
    width: 130px;
    height: 98px;
    background-color: #000000;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 10px;
    border: 1px solid #666666;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-title {
    font-size: 11px;
    font-weight: bold;
    color: #0066CC;
    margin-bottom: 3px;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
}

.video-info {
    font-size: 10px;
    color: #666666;
}

.video-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #FFFFFF;
    padding: 1px 4px;
    font-size: 10px;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    background-color: #F5F5F5;
    border: 1px solid #CCCCCC;
    padding: 20px;
}

.form-container h2 {
    color: #333333;
    margin-bottom: 15px;
    font-size: 16px;
}

.form-table {
    width: 100%;
}

.form-table td {
    padding: 5px;
    vertical-align: top;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="url"],
.form-table textarea,
.form-table select {
    font-size: 12px;
    padding: 4px;
    border: 1px solid #CCCCCC;
    background-color: #FFFFFF;
}

.form-table textarea {
    font-family: Arial, Helvetica, sans-serif;
    resize: vertical;
}

.form-buttons {
    text-align: center;
    padding-top: 15px;
}

.button {
    padding: 6px 12px;
    font-size: 11px;
    border: 1px solid #999999;
    background: linear-gradient(to bottom, #FFFFFF 0%, #E6E6E6 100%);
    cursor: pointer;
    margin: 0 5px;
}

.button:hover {
    background: linear-gradient(to bottom, #F0F0F0 0%, #D0D0D0 100%);
}

.button.primary {
    background: linear-gradient(to bottom, #4C7BD9 0%, #3366CC 100%);
    color: #FFFFFF;
    border-color: #2952A3;
}

.button.primary:hover {
    background: linear-gradient(to bottom, #3366CC 0%, #2952A3 100%);
}

/* 2007 YouTube Player Styles */
.player-container {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    margin-bottom: 15px;
}

.player-container:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.player-container:fullscreen .bottom-bar {
    flex-shrink: 0;
}

.player-container:fullscreen .bottom-bar {
    width: 100%;
}

.player-container:fullscreen .controls-bar {
    width: 100%;
}

.video-area {
    width: 100%;
    height: 100%;
    min-width: 480px;
    min-height: 360px;
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    background: #000;
}

.video-area video {
    background-color: #000;
    min-width: 100%;
    min-height: auto;
}

.video-area:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-area:fullscreen video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#loadingIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: url('assets/loading_frames/1.png') no-repeat center center;
    background-size: 30px 30px;
    display: none;
    z-index: 100000000000;
}

.ended-buttons {
    display: block;
    position: absolute;
    top: 20%;
    left: 55%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 999999;
    pointer-events: auto;
    white-space: nowrap;
}

.ended-buttons button {
    display: inline-block;
    border: none;
    background-color: transparent;
    cursor: pointer;
    vertical-align: middle;
    margin: 0 -35px;
    width: 188px;
    height: 53px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

video {
    position: relative;
    z-index: 1;
}

.ended-buttons {
    z-index: 999999;
}

/* Share Button */
.share-btn {
    background-image: url('assets/share_controls/1.png');
}

.share-btn:hover {
    background-image: url('assets/share_controls/2.png');
}

.share-btn:active {
    background-image: url('assets/share_controls/3.png');
}

/* Watch Again Button */
.watch-again-btn {
    background-image: url('assets/play_again_controls/1.png');
}

.watch-again-btn:hover,
.watch-again-btn:active {
    background-image: url('assets/play_again_controls/2.png');
}

/* Bottom bar setup */
.bottom-bar {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 31px;
}

.player-container:fullscreen .bottom-bar,
.player-container:-webkit-full-screen .bottom-bar,
.player-container:-moz-full-screen .bottom-bar,
.player-container:-ms-fullscreen .bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.bar-left,
.bar-right,
.progress-handle {
    image-rendering: smooth;
}

.bar-left {
    width: 5px;
    height: 31px;
    background: url('assets/background/bg_left.png') no-repeat left bottom;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.bar-center {
    height: 31px;
    margin: 0;
    padding: 0;
    background: url('assets/background/bg_center.png') repeat-x left bottom;
    width: 100%;
}

.bar-right {
    width: 5px;
    height: 31px;
    background: url('assets/background/bg_right.png') no-repeat right bottom;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* Controls bar sits above the backgrounds */
.controls-bar {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    z-index: 9999;
    padding: 0 4px;
}

.player-container:fullscreen .controls-bar,
.player-container:-webkit-full-screen .controls-bar,
.player-container:-moz-full-screen .controls-bar,
.player-container:-ms-fullscreen .controls-bar {
    width: 100%;
}

.left-controls {
    display: flex;
    align-items: center;
}

.right-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.control-button {
    display: inline-block;
    vertical-align: middle;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    background: none;
}

/* Play/Pause Button (not playing) */
.pause-btn {
    width: 30px;
    height: 25px;
    background:
        url('assets/playpausebuttons/play_icon.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg.png') no-repeat 50% 50%;
    margin-right: 1px;
}

.pause-btn:hover {
    background:
        url('assets/playpausebuttons/play_icon_hover.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg.png') no-repeat 50% 50%;
}

.pause-btn:active {
    background:
        url('assets/playpausebuttons/play_icon_hover.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg_clicked.png') no-repeat 50% 50%;
}

/* Play/Pause Button (playing) */
.pause-btn.playing {
    background:
        url('assets/playpausebuttons/pause_icon.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg.png') no-repeat 50% 50%;
}

.pause-btn.playing:hover {
    background:
        url('assets/playpausebuttons/pause_icon_hover.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg.png') no-repeat 50% 50%;
}

.pause-btn.playing:active {
    background:
        url('assets/playpausebuttons/pause_icon_hover.png') no-repeat 60% center,
        url('assets/playpausebuttons/play_pause_bg_clicked.png') no-repeat 50% 50%;
}

/* Rewind Button */
.rewind-btn {
    width: 23px;
    height: 25px;
    background:
        url('assets/rewind/rewind.png') no-repeat center center,
        url('assets/rewind/rewind_bg.png') no-repeat center center;
}

.rewind-btn:hover {
    background:
        url('assets/rewind/rewind_icon_hover.png') no-repeat center center,
        url('assets/rewind/rewind_bg.png') no-repeat center center;
}

.rewind-btn:active {
    background:
        url('assets/rewind/rewind_icon_hover.png') no-repeat center center,
        url('assets/rewind/rewind_bg_clicked.png') no-repeat center center;
}

/* Timeline */
.progress-section {
    position: relative;
    height: 8px;
    background: none;
    flex: 1;
    min-width: 0;
    margin: 0 12px;
    z-index: 9999;
    display: block;
}

.progress-background {
    width: auto;
    height: 8px;
    background: url('assets/timeline/timeline.png') repeat-x left center;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.progress-loaded {
    left: 0;
    background: url('assets/timeline/played_bar_connected.png') repeat-x left center;
    opacity: 0.6;
    z-index: 1;
}

.progress-red {
    position: absolute;
    top: 0;
    left: 0;
    height: 8px;
    background: url('assets/timeline/played_bar_connected.png') repeat-x left center;
    z-index: 2;
}

.progress-loaded,
.progress-red {
    position: absolute;
    top: 0;
    height: 8px;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 21px;
    height: 21px;
    background: url('assets/timeline/cursor/timeline_cursor.png') no-repeat center center;
    cursor: pointer;
    z-index: 9999;
}

.progress-handle.active {
    background: url('assets/timeline/cursor/timeline_cursor_red.png') no-repeat center center !important;
}

.player-container:fullscreen .progress-section,
.player-container:-webkit-full-screen .progress-section,
.player-container:-moz-full-screen .progress-section,
.player-container:-ms-fullscreen .progress-section {
    flex: 1;
    min-width: 0;
    width: auto;
}

/* Time Section */
.time-section {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    margin-right: 0px;
    font-family: 'OriginalYTFont', Arial, sans-serif;
}

.time-box {
    width: 70px;
    height: 18px;
    background: url('assets/timeline/time_bg.png') no-repeat center center;
    text-align: center;
    line-height: 18px;
    font-size: 10px;
    color: #fff;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    margin-left: -10px;
}

.time-current { color: #fff; }
.time-total { color: #C00; }
.time-sep { color: #fff; margin: 0 2px; }

/* Divider */
.divider {
    width: 2px;
    height: 31px;
    background: url('assets/background/divider.png') no-repeat center center;
    display: inline-block;
    vertical-align: middle;
}

/* Volume Section */
.volume-section {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 8px;
}

.volume-track {
    position: relative;
    width: 45px;
    height: 4px;
    background: url('assets/volume/volume_slider_bg.png') repeat-x center center;
    margin-right: 4px;
}

.volume-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: url('assets/volume/volume_level.png') repeat-x center center;
    pointer-events: none;
}

.volume-handle {
    position: absolute;
    width: 7px;
    height: 20px;
    background: url('assets/volume/volume_slider.png') no-repeat center center;
    top: 50%;
    transform: translateY(-50%);
    left: 100%;
    cursor: pointer;
    z-index: 9999;
}

/* Default volume icon */
.volume-btn {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    background: url('assets/volume/volume_icon_4.png') no-repeat center center;
    background-size: contain;
}

/* Muted class to grey out at 0% volume */
.volume-btn.muted {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* Fullscreen Button */
.fullscreen-btn {
    display: inline-block;
    vertical-align: middle;
    margin-left: 3px;
    margin-right: 3px;
    width: 25px;
    height: 18px;
    background: url('assets/fullscreen_button/1.png') no-repeat center center;
    background-size: 25px 18px;
    image-rendering: auto;
    transition: 0.3s ease;
}

.fullscreen-btn:fullscreen {
    display: inline-block;
    vertical-align: middle;
    margin-left: 3px;
    margin-right: 6px;
    width: 25px;
    height: 18px;
    background: url('assets/fullscreen_button/1.png') no-repeat center center;
    background-size: 25px 18px;
    image-rendering: auto;
    transition: 0.3s ease;
}

.exit-icon {
    background-image: url('assets/fullscreen_button/exit_fullscreen.png');
    background-size: 45px 15px;
    width: 45px;
    height: 15px;
}

/* Video Player */
#player-container {
    background-color: #000000;
    width: 100%;
    height: 100%;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #CCCCCC;
}

#video-player video,
#video-player audio,
#video-player embed {
    width: 100%;
    height: 100%;
}

#video-info {
    margin-bottom: 20px;
}

#video-info h2 {
    font-size: 16px;
    color: #333333;
    margin-bottom: 8px;
}

#video-stats {
    font-size: 11px;
    color: #666666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#rating-buttons button {
    background: linear-gradient(to bottom, #FFFFFF 0%, #E6E6E6 100%);
    border: 1px solid #CCCCCC;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    margin-right: 5px;
}

#rating-buttons button:hover {
    background: linear-gradient(to bottom, #F0F0F0 0%, #D0D0D0 100%);
}

#rating-buttons button.active {
    background: linear-gradient(to bottom, #FFE066 0%, #FFCC00 100%);
    border-color: #E6B800;
}

#video-description-container {
    background-color: #F5F5F5;
    border: 1px solid #CCCCCC;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
}

#uploader-info {
    font-size: 12px;
    margin-bottom: 20px;
}

#uploader-info a {
    color: #0066CC;
    text-decoration: none;
}

#uploader-info a:hover {
    text-decoration: underline;
}

/* Comments */
#comments-section {
    border-top: 1px solid #CCCCCC;
    padding-top: 15px;
    margin-top: 20px;
}

#comments-section h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333333;
}

#comment-form textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #CCCCCC;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin-bottom: 5px;
}

.comment {
    background-color: #F5F5F5;
    border: 1px solid #CCCCCC;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.comment-header {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 11px;
}

.comment-author {
    color: #0066CC;
    text-decoration: none;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-date {
    color: #666666;
    font-weight: normal;
}

.comment-text {
    line-height: 1.4;
}

/* Related Videos */
#related-videos {
    margin-top: 30px;
    border-top: 1px solid #CCCCCC;
    padding-top: 15px;
}

#related-videos h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333333;
}

#related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    display: flex;
    gap: 10px;
    padding: 5px;
    background-color: #F5F5F5;
    border: 1px solid #CCCCCC;
    cursor: pointer;
}

.related-item:hover {
    background-color: #E6E6E6;
}

.related-thumb {
    width: 80px;
    height: 60px;
    background-color: #000000;
    flex-shrink: 0;
    border: 1px solid #666666;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    flex: 1;
}

.related-title {
    font-size: 11px;
    font-weight: bold;
    color: #0066CC;
    margin-bottom: 3px;
    line-height: 1.3;
}

.related-stats {
    font-size: 10px;
    color: #666666;
}

/* Tabs */
#admin-tabs, #settings-tabs {
    margin-bottom: 20px;
}

.tab-button {
    padding: 8px 16px;
    background: linear-gradient(to bottom, #FFFFFF 0%, #E6E6E6 100%);
    border: 1px solid #CCCCCC;
    cursor: pointer;
    font-size: 11px;
    margin-right: 2px;
}

.tab-button.active {
    background: linear-gradient(to bottom, #F5F5F5 0%, #CCCCCC 100%);
    border-bottom-color: #F5F5F5;
}

.tab-button:hover:not(.active) {
    background: linear-gradient(to bottom, #F0F0F0 0%, #D0D0D0 100%);
}

/* Admin Panel */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #CCCCCC;
    padding: 5px 8px;
    text-align: left;
}

.admin-table th {
    background: linear-gradient(to bottom, #E6E6E6 0%, #CCCCCC 100%);
    font-weight: bold;
}

.admin-table tr:nth-child(even) {
    background-color: #F5F5F5;
}

/* Footer */
#footer {
    background-color: #F5F5F5;
    border-top: 1px solid #CCCCCC;
    margin-top: 30px;
    padding: 15px 0;
    text-align: center;
}

#footer-content {
    max-width: 980px;
    margin: 0 auto;
    font-size: 10px;
    color: #666666;
}

#footer-content p {
    margin-bottom: 5px;
}

#footer-content a {
    color: #0066CC;
    text-decoration: none;
}

#footer-content a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 800px) {
    #main-container {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #CCCCCC;
    }
    
    .video-grid {
        justify-content: center;
    }
    
    #player-container {
        width: 100%;
        max-width: 425px;
    }
}

@media (max-width: 400px) {
    .time-box {
        display: none;
    }
}
