/* General Layout*/

body {
    max-width: 100%;
    background: linear-gradient(135deg, #0A0F1E 0%, #1A1F2E 100%);
    color: #ffffff;
    overflow-x: hidden;
}

.youtube-button:hover {
    background-color: #1f245a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 36, 90, 0.3);
}

/* YouTube Profile Styles */
.youtube-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chnl-items:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.youtube-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(79, 156, 249, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.youtube-avatar:hover {
    transform: scale(1.05);
}

.youtube-text {
    flex: 1;
}

.youtube-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #4F9CF9 0%, #6C63FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.youtube-desc {
    font-size: 15px;
    color: #a8b2d1;
    margin: 10px 0 15px;
    line-height: 1.6;
}

.youtube-button {
    display: inline-block;
    background: linear-gradient(135deg, #4F9CF9 0%, #6C63FF 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 156, 249, 0.2);
}

.youtube-button:hover {
    color: #F4F4F4;
    background-color: #121544;
}

#main {
    height: 100vh;
    padding-top: 15px;
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

.page-wrapper {
    width: 100%;
    height: auto;
    display: grid;
    justify-content: center;
}

#section {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: grid;
    justify-content: center;
}

.portfolio-container {
    width: 100%;
    padding: 60px 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio-section {
    margin-bottom: 60px;
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #4F9CF9 0%, #6C63FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    text-align: center;
}

.portfolio-items .empty-txt {
    font-size: 16px;
    color: #7B7B7B;
    text-align: center;
}

/* Video Grid*/
.portfolio-items {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    padding: 30px;
    margin: 25px 0px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-items:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.video-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 1320px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.portfolio-items .video-row {
    justify-content: flex-start;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.video-row.featured-video {
    margin-top: 20px;
    margin-bottom: 0px;
    justify-content: flex-start;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.featured-video .pin-video {
    border: 1px solid rgba(79, 156, 249, 0.3);
    position: relative;
    box-shadow: 0 8px 24px rgba(79, 156, 249, 0.2);
    background: rgba(79, 156, 249, 0.05);
}

/* Each Video Wrapper*/
.video-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
    flex: 1 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    padding-bottom: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(79, 156, 249, 0.2);
}

.video-thumbnail-wrapper {
    display: grid;
    overflow: hidden;
}

.video-wrapper iframe.video-embed:hover {
    transform: scale(1.05);
}

/* YouTube Video */
.video-wrapper iframe.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 12px 12px 0 0;
    transition: 0.2s;
}

.video-meta {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    font-size: 14px;
    color: #a8b2d1;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.video-meta p {
    margin: 5px 0;
    color: #a8b2d1;
}

@media screen and (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }

    #main {
        padding: 10px;
        margin-top: 50px;
    }

    .portfolio-container {
        padding: 20px 0;
        width: 100%;
    }

    .portfolio-section {
        margin-bottom: 40px;
        padding: 0 15px;
    }

    .portfolio-title {
        font-size: 24px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .portfolio-items {
        padding: 15px;
        margin: 15px 0;
        border-radius: 16px;
    }

    .video-row {
        gap: 15px;
        margin: 10px 0;
    }

    .video-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }

    .video-meta {
        padding: 12px;
    }

    .video-meta p {
        font-size: 13px;
        line-height: 1.4;
    }

    .youtube-profile {
        flex-direction: column;
        padding: 20px;
        text-align: center;
        gap: 15px;
    }

    .youtube-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .youtube-text {
        width: 100%;
    }

    .youtube-name {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .youtube-desc {
        font-size: 14px;
        margin: 8px 0 12px;
    }

    .youtube-button {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
        padding: 12px 20px;
        font-size: 14px;
    }

    .video-modal .modal-content {
        width: 95%;
        padding: 10px;
    }

    .video-modal iframe {
        border-radius: 12px;
    }

    .modal-close {
        top: -40px;
        right: 10px;
        font-size: 28px;
    }

    .chnl-items {
        max-width: 100%;
        margin: 10px 0;
    }

    .featured-video .video-wrapper {
        margin-bottom: 20px;
    }

    .video-sort-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0 15px;
    }

    .video-sort-buttons button {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
        margin: 0;
        font-size: 13px;
        padding: 10px 5px;
    }
}

@media screen and (max-width: 480px) {
    .youtube-desc {
        font-size: 12px;
        line-height: 1.4;
    }

    .video-sort-buttons button {
        flex: 1 1 100%;
    }

    .portfolio-items {
        margin: 10px 0;
        padding: 12px;
    }

    .video-wrapper iframe.video-embed {
        border-radius: 8px 8px 0 0;
    }
}

.video-wrapper .video-date {
    display: block; /* Add this line to hide the date by default */
}

.video-sort-buttons {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.video-sort-buttons button {
    background-color: #292E6F;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 100px;
}

.video-sort-buttons button:hover {
    background-color: #1f245a;
}

.video-sort-buttons button.active {
    background-color: #4c57c4;
}


.video-wrapper.playing {
    z-index: 9999;
    position: relative;
    transform: scale(1.2);
    transition: transform 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

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

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.modal-close {
    position: absolute;
    right: -40px;
    top: -40px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    .modal-close {
        right: 0;
        top: -40px;
    }
}

/* Scroll effect for site header */
.site-header.scrolled {
    background-color: rgba(41, 46, 111, 0.9);
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chnl-items {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.1s linear;
}

#modal-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: blur(15px) brightness(0.5);
    opacity: 0.4;
    pointer-events: none;
}
.chnl-items {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.1s linear;
}

.modal-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px) brightness(0.4);
    opacity: 0.5;
    z-index: -1;
}

/* Styles for single iframe mode */
.modal-content.single-iframe-mode {
    position: relative;
    width: 90%;
    max-width: 960px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.single-iframe-blur {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pin-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-image: url('../images/pin.png'); /* adjust path and filename as needed */
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 500;
}

#logout-btn {
    font-size: 14px;
    padding: 8px 14px;
    margin-top: -30px;
    float: right;
    color: #ffffff;
    background-color: #E06565;
  }
  
  #logout-btn:hover {
    background-color: #C05454;
  }