/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #141414;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 70px;
    background: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}
.sidebar-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.2rem;
}
.sidebar-logo {
    width: 40px;
    margin-bottom: 2rem;
}
.sidebar a {
    color: #fff;
    font-size: 1.4rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.sidebar a:hover, .sidebar a.active {
    opacity: 1;
    color: #e50914;
}

/* Main Content */
.main-content {
    margin-left: 70px;
    width: calc(100vw - 70px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #141414;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}
.hero-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 112.5vw; /* 200vw * 9/16 for 16:9 aspect ratio */
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.5) blur(1px);
    pointer-events: none;
    background: #000;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #141414 30%, rgba(20,20,20,0.7) 60%, rgba(20,20,20,0.1) 100%);
    z-index: 2;
}
.hero-details {
    position: relative;
    z-index: 3;
    margin-left: 4vw;
    margin-bottom: 3vw;
    max-width: 40vw;
    color: #fff;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.netflix-badge {
    background: #e50914;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.1rem 0.5rem;
    border-radius: 2px;
    letter-spacing: 2px;
    margin-right: 0.3rem;
}
.series-label {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.7;
    letter-spacing: 0.2em;
}
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
    text-shadow: 2px 2px 8px #000;
}
.hero-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
}
.match {
    color: #46d369;
    font-weight: bold;
}
.year, .badge {
    background: rgba(51,51,51,0.7);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.2rem;
}
.hero-desc {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px #000;
}

/* Works Row */
.works-section {
    margin-top: 2vw;
    padding-left: 4vw;
    padding-right: 2vw;
    position: relative;
    min-height: 200px;
}
.row-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}
.works-row {
    display: flex;
    overflow-x: auto;
    gap: 1.2rem;
    padding-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.works-row::-webkit-scrollbar {
    display: none;
}
.works-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 1.2rem;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}
.works-grid::-webkit-scrollbar {
    display: none;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.scroll-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.scroll-arrow.show {
    opacity: 1;
    pointer-events: all;
}

.scroll-arrow.left {
    left: 10px;
}

.scroll-arrow.right {
    right: 10px;
}
.work-item {
    background: #222;
    border-radius: 6px;
    min-width: 180px;
    max-width: 180px;
    aspect-ratio: 2/3;
    height: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Projects section - larger tiles */
[data-category="projects"] .work-item {
    min-width: 250px;
    max-width: 250px;
}

.work-item .rank-number {
    position: absolute;
    bottom: 15px;
    left: 15px;
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9);
    z-index: 3;
    line-height: 0.8;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
}
.work-item:hover {
    transform: scale(1.08);
    z-index: 2;
    box-shadow: 0 4px 16px #000;
}
.work-thumb-img,
.work-thumb-video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
    transition: opacity 0.3s;
    background: #111;
    z-index: 1;
}
.work-thumb-img {
    opacity: 1;
}
.work-thumb-video {
    opacity: 0;
    pointer-events: none;
}
.work-item:hover .work-thumb-video {
    opacity: 1;
}
.work-item:hover .work-thumb-img {
    opacity: 0;
}
.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(20,20,20,0.95) 80%, rgba(20,20,20,0.1) 100%);
    padding: 0.7rem 1rem 1.2rem 1rem;
    color: #fff;
    opacity: 1;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}
.work-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 0.01em;
}
.work-info .work-badge {
    background: #e50914;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}


/* Netflix Footer */
.netflix-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0 1rem 0;
}
.netflix-footer img {
    width: 120px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero-details {
        max-width: 70vw;
        margin-left: 2vw;
    }
    .main-content {
        margin-left: 60px;
        width: calc(100vw - 60px);
    }
    .sidebar {
        width: 60px;
    }
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
@media (max-width: 600px) {
    .hero-section {
        height: 40vh;
        min-height: 220px;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .sidebar {
        width: 40px;
    }
    .main-content {
        margin-left: 40px;
        width: calc(100vw - 40px);
    }
}

.player-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}
.player-modal.active {
    display: flex;
}
.player-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1;
}
.player-modal-content {
    position: relative;
    z-index: 2;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    max-width: 900px;
    width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.player-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 3;
    cursor: pointer;
    transition: color 0.2s;
}
.player-modal-close:hover {
    color: #e50914;
}
.player-modal-video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.player-modal-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

@media (max-width: 600px) {
    .player-modal-content {
        max-width: 98vw;
        width: 98vw;
    }
}

/* --- Professional Mobile Overhaul --- */

/* Top bar: logo left, hamburger right, hide sidebar icons */
@media (max-width: 700px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0; right: 0;
        width: 100vw;
        height: 56px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1.2rem;
        z-index: 1000;
        background: #000;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .sidebar-icons {
        flex-direction: row;
        gap: 0.5rem;
        width: 100vw;
        justify-content: space-between;
    }
    .sidebar-logo {
        width: 36px;
        margin-bottom: 0;
        margin-right: 0;
    }
    .sidebar a:not(:first-child) { display: none; }
    .sidebar::after {
        display: none; /* Hide pseudo-element */
    }
    
    .mobile-menu-toggle {
        display: none;
        position: absolute;
        right: 1.2rem;
        top: 0.7rem;
        background: none;
        border: none;
        color: #fff;
        font-size: 2rem;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    @media (max-width: 700px) {
        .mobile-menu-toggle {
            display: flex;
        }
    }
    
    /* Mobile menu overlay - only show on mobile */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        z-index: 999;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        background: #000;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 60px;
    }
    
    .mobile-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu a {
        display: block;
        color: #fff;
        padding: 1rem 2rem;
        text-decoration: none;
        font-size: 1.1rem;
        border-bottom: 1px solid #333;
        transition: background 0.2s;
    }
    
    .mobile-menu a:hover {
        background: #333;
    }
    
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: #fff;
        font-size: 2rem;
        cursor: pointer;
    }
    .main-content {
        margin-left: 0;
        margin-top: 56px;
        width: 100vw;
        min-height: calc(100vh - 56px);
        position: relative;
        z-index: 1;
    }
}

/* Hero: 16:9, centered overlay, large title, padding */
@media (max-width: 700px) {
    .hero-section {
        height: auto;
        min-height: unset;
        aspect-ratio: 16/9;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }
    .hero-bg {
        aspect-ratio: 16/9;
        height: auto;
        min-height: unset;
        max-height: 220px;
    }
    .hero-details {
        position: absolute;
        left: 0; right: 0;
        margin: 0 auto 1.5rem auto;
        max-width: 95vw;
        text-align: center;
        padding: 0 1rem;
    }
    .hero-title {
        font-size: 1.3rem;
        font-weight: 900;
        margin-bottom: 0.5rem;
    }
    .hero-info {
        gap: 0.3rem;
        font-size: 0.9rem;
        justify-content: center;
    }
    .hero-desc {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

/* Works: horizontally scrollable row of large cards, snap scrolling */
@media (max-width: 700px) {
    .works-section {
        padding-left: 2vw;
        padding-right: 2vw;
        margin-bottom: 2rem;
    }
    
    .works-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
        padding: 0 0.5rem 1.5rem 0.5rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .work-item {
        min-width: 60vw;
        max-width: 70vw;
        aspect-ratio: 2/3;
        border-radius: 8px;
        scroll-snap-align: start;
        margin-bottom: 0.5rem;
        flex-shrink: 0;
    }
    
    /* Projects section - larger tiles on mobile */
    [data-category="projects"] .work-item {
        min-width: 75vw;
        max-width: 85vw;
    }
    .work-thumb-img, .work-thumb-video {
        border-radius: 8px 8px 0 0;
    }
    .work-info {
        padding: 0.7rem 1rem 1.2rem 1rem;
        font-size: 1rem;
    }
    .work-info h3 {
        font-size: 1.1rem;
    }
    .work-item .rank-number {
        font-size: 3.5rem;
        bottom: 12px;
        left: 12px;
    }
    
    /* Mobile scroll arrows */
    .scroll-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.9) !important;
        color: #fff !important;
        z-index: 100;
        opacity: 1 !important;
        pointer-events: all !important;
    }
    
    .scroll-arrow.left {
        left: 5px;
    }
    
    .scroll-arrow.right {
        right: 5px;
    }
}

/* Modal: fullscreen, easy close, video fits width */
@media (max-width: 700px) {
    .player-modal-content {
        max-width: 100vw;
        width: 100vw;
        border-radius: 0;
        min-height: 100vh;
        align-items: flex-end;
    }
    .player-modal-video {
        padding-bottom: 56.25vw;
        border-radius: 0;
        width: 100vw;
        min-height: 40vw;
    }
    .player-modal-close {
        top: 2px;
        right: 8px;
        font-size: 2rem;
        z-index: 10;
    }
}



/* Remove hover effects on mobile (show only image, or tap to preview if desired) */
@media (hover: none) and (pointer: coarse) {
    .work-thumb-video { display: none !important; }
    .work-thumb-img { opacity: 1 !important; }
}

/* Video tile styling for hover-to-play sections */
.section.coseli-projects .tile[data-video],
.section.marambha .tile[data-video],
.section.jeevan-vigyan .tile[data-video],
.section.oevs .tile[data-video] {
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #222 !important;
    border-radius: 6px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.section.coseli-projects .tile[data-video] iframe,
.section.marambha .tile[data-video] iframe,
.section.jeevan-vigyan .tile[data-video] iframe,
.section.oevs .tile[data-video] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section.coseli-projects .tile[data-video]:hover iframe,
.section.marambha .tile[data-video]:hover iframe,
.section.jeevan-vigyan .tile[data-video]:hover iframe,
.section.oevs .tile[data-video]:hover iframe {
    opacity: 1;
}

/* Hover effects for video tiles */
.section.coseli-projects .tile[data-video]:hover,
.section.marambha .tile[data-video]:hover,
.section.jeevan-vigyan .tile[data-video]:hover,
.section.oevs .tile[data-video]:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.7);
}

/* Tile overlay and play icon styles */
.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: background 0.3s ease;
}

.tile-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tile[data-video]:hover .tile-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.tile[data-video]:hover .tile-play-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Image styles for video tiles - CRITICAL FOR THUMBNAILS */
.tile[data-video] img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    z-index: 0 !important;
    transition: opacity 0.3s ease !important;
    opacity: 1 !important; /* Force images to be visible */
    display: block !important;
    visibility: visible !important;
}

.tile[data-video]:hover img {
    opacity: 0 !important;
}

/* Specific styles for Coseli section to ensure thumbnails work like Fonepay */
.section.coseli-projects .tile[data-video] img {
    opacity: 1 !important;
    z-index: 0 !important;
    display: block !important;
    visibility: visible !important;
    max-width: none !important;
    max-height: none !important;
    background: #ff0000 !important; /* Temporary red background to see if images are there */
    border: 5px solid blue !important; /* Temporary blue border to see if images are there */
    min-width: 100px !important;
    min-height: 100px !important;
}

.section.coseli-projects .tile[data-video]:hover img {
    opacity: 0 !important;
}

/* Styles for Marambha section (Sweta Acharya) */
.section.marambha .tile[data-video] img {
    opacity: 1 !important;
    z-index: 0 !important;
    display: block !important;
    visibility: visible !important;
    max-width: none !important;
    max-height: none !important;
    background: #00ff00 !important; /* Temporary green background */
    border: 5px solid purple !important; /* Temporary purple border */
    min-width: 100px !important;
    min-height: 100px !important;
}

.section.marambha .tile[data-video]:hover img {
    opacity: 0 !important;
}

/* Styles for Jeevan Vigyan section */
.section.jeevan-vigyan .tile[data-video] img {
    opacity: 1 !important;
    z-index: 0 !important;
    display: block !important;
    visibility: visible !important;
    max-width: none !important;
    max-height: none !important;
    background: #ffff00 !important; /* Temporary yellow background */
    border: 5px solid orange !important; /* Temporary orange border */
    min-width: 100px !important;
    min-height: 100px !important;
}

.section.jeevan-vigyan .tile[data-video]:hover img {
    opacity: 0 !important;
}

/* Styles for OEVS section */
.section.oevs .tile[data-video] img {
    opacity: 1 !important;
    z-index: 0 !important;
    display: block !important;
    visibility: visible !important;
    max-width: none !important;
    max-height: none !important;
    background: #00ffff !important; /* Temporary cyan background */
    border: 5px solid magenta !important; /* Temporary magenta border */
    min-width: 100px !important;
    min-height: 100px !important;
}

.section.oevs .tile[data-video]:hover img {
    opacity: 0 !important;
}

.creative-loading-bar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 20, 20, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.creative-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.creative-bar {
  width: 320px;
  height: 16px;
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 2px 16px #e5091477;
  position: relative;
}
.creative-bar::before {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e50914, #fbb034, #ffdd00, #3adbff, #e50914);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: creative-bar-progress 5s linear forwards;
}
@keyframes creative-bar-progress {
  0% { width: 0%; background-position: 0% 50%; }
  100% { width: 100%; background-position: 100% 50%; }
}
.creative-bar-bubbles {
  position: absolute;
  top: -18px;
  left: 0;
  width: 100%;
  height: 50px;
  pointer-events: none;
}
.creative-bar-bubbles::before, .creative-bar-bubbles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
  animation: bubble-float 2.5s infinite ease-in-out;
}
.creative-bar-bubbles::before {
  width: 18px; height: 18px;
  left: 30px;
  background: #e50914;
  animation-delay: 0.2s;
}
.creative-bar-bubbles::after {
  width: 12px; height: 12px;
  left: 120px;
  background: #fbb034;
  animation-delay: 0.7s;
}
@keyframes bubble-float {
  0% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-40px) scale(0.8); opacity: 0; }
}
.creative-bar-text {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-top: 8px;
  text-shadow: 0 2px 8px #e50914cc;
  font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
} 