/* Age Daily Home Page Styles */

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

body {
    background: #F5F5DC;
    min-height: 100vh;
    font-family: Georgia, 'Times New Roman', serif;
    position: relative;
}

/* Background video blur effect - always visible */
.video-background-blur {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    filter: blur(8px);
    opacity: 0.85;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.video-background-blur iframe,
.video-background-blur #backgroundVideoPlayer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Main Featured Section - Centered */
.featured-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 60px;
    z-index: 10;
}

/* Large Cover Display */
.featured-cover-large {
    width: 420px;
    height: 600px;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.featured-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Featured Info */
.featured-info {
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-author-name {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 42px;
    color: white;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.featured-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 22px;
    color: white;
    font-weight: normal;
    font-style: italic;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.featured-description {
    font-family: Georgia, serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Preview Thumbnails */
.preview-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.preview-thumb {
    width: 55px;
    height: 78px;
    background: white;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.preview-thumb:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.preview-thumb.active {
    opacity: 1;
    box-shadow: 0 0 0 2px white, 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Shop Link */
.shop-link {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 18px;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    align-self: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
    margin-top: 10px;
    transition: border-color 0.2s ease;
}

.shop-link:hover {
    border-color: white;
}

/* Video Preview Section - Fixed in Lower Left */
.video-preview-section {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
}

.video-preview-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 180px;
    margin-bottom: 8px;
}

.video-preview-header {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 24px;
    color: #000;
}

/* TV On/Off Toggle */
.tv-toggle-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-label {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666;
}

.toggle-on-label {
    color: #0f0;
}

body.tv-off .toggle-on-label {
    color: #666;
}

body.tv-off .toggle-off-label {
    color: #f00;
}

.tv-toggle {
    width: 28px;
    height: 14px;
    background: #333;
    border-radius: 7px;
    cursor: pointer;
    position: relative;
}

.toggle-slider {
    width: 10px;
    height: 10px;
    background: #0f0;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

body.tv-off .toggle-slider {
    left: 16px;
    background: #f00;
}

/* No Signal screen */
.no-signal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #001a00;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

body.tv-off .no-signal {
    display: flex;
}

body.tv-off .video-player-container {
    display: none;
}

body.tv-off .video-background-blur {
    display: none;
}

body.tv-off {
    background: #0a1a0a;
}

/* TV off - featured section text becomes darker */
body.tv-off .featured-author-name,
body.tv-off .featured-title,
body.tv-off .featured-description,
body.tv-off .shop-link {
    color: rgba(255, 255, 255, 0.4);
    text-shadow: none;
}

body.tv-off .preview-thumb {
    opacity: 0.3;
}

body.tv-off .preview-thumb.active {
    opacity: 0.5;
}

.video-preview-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.video-preview {
    width: 180px;
    height: 135px;
    cursor: pointer;
    border: 3px solid red;
    background: #000;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.video-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.video-player-container {
    width: 100%;
    height: 100%;
    position: relative;
    pointer-events: none;
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Controls */
.video-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-arrow {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: #000;
    transition: opacity 0.2s;
}

.control-arrow:hover {
    opacity: 0.6;
}

.control-mute {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.2s;
}

.control-mute:hover {
    opacity: 0.6;
}

.mute-icon {
    display: block;
}

/* Video Info */
.video-info {
    margin-top: 10px;
    max-width: 280px;
}

.video-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-source {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    color: #000;
}

.source-link {
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media screen and (max-width: 1000px) {
    .featured-section {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
        padding-bottom: 200px; /* Space for video preview */
    }

    .featured-cover-large {
        width: 280px;
        height: 400px;
    }

    .featured-info {
        text-align: center;
        align-items: center;
    }

    .featured-author-name {
        font-size: 32px;
    }

    .featured-title {
        font-size: 18px;
    }

    .preview-thumbnails {
        justify-content: center;
    }

    .shop-link {
        align-self: center;
    }
}

@media screen and (max-width: 600px) {
    .featured-cover-large {
        width: 220px;
        height: 315px;
    }

    .featured-author-name {
        font-size: 26px;
    }

    .featured-title {
        font-size: 16px;
    }

    .featured-description {
        font-size: 13px;
    }

    .preview-thumb {
        width: 45px;
        height: 64px;
    }

    .video-preview-section {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .video-preview-header {
        font-size: 20px;
    }

    .video-preview {
        width: 140px;
        height: 105px;
    }

    .video-controls {
        gap: 4px;
    }

    .control-arrow {
        font-size: 20px;
        padding: 3px 8px;
    }

    .mute-icon {
        width: 20px;
        height: 20px;
    }

    .video-info {
        max-width: 100%;
    }

    .video-title {
        font-size: 13px;
    }

    .video-source {
        font-size: 12px;
    }
}
