* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

.showreel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.showreel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showreel-logo {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.showreel-logo img {
    width: min(45vw, 405px);
    max-width: 70%;
    height: auto;
    opacity: 1;
}

.projects-section {
    padding: 0;
    background-color: #000000;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0;
    width: 100vw;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 (1920x1080) */
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.6s ease;
    filter: brightness(0.7);
    z-index: 10;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
}

.video-thumbnail video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumbnail:hover {
    filter: brightness(1.1);
    z-index: 10;
}

/* Placeholder colors */
.placeholder-1 {
    background-color: #FF6B6B;
}

.placeholder-2 {
    background-color: #4ECDC4;
}

.placeholder-3 {
    background-color: #45B7D1;
}

.placeholder-4 {
    background-color: #FFA07A;
}

.placeholder-5 {
    background-color: #98D8C8;
}

.placeholder-6 {
    background-color: #F7DC6F;
}

.placeholder-7 {
    background-color: #BB8FCE;
}

.placeholder-8 {
    background-color: #85C1E2;
}

.placeholder-9 {
    background-color: #F8B88B;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    pointer-events: none;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.active .modal-overlay {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.video-modal:not(.active) .modal-overlay {
    animation: fadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 95%;
    max-width: 1500px;
    aspect-ratio: 16/9;
    margin: 30px;
    pointer-events: none;
    transform: scale(0.9);
    opacity: 0;
    display: none;
}

.video-modal.active .modal-content {
    display: block;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.video-modal:not(.active) .modal-content {
    display: none;
    animation: scaleOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

.modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: auto;
}

.modal-placeholder {
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(9, 1fr);
    }
}

