body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #1A2B3C;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00AEEF;
}

header .logo img {
    height: 20px;
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin-left: 20px;
    border-left: 1px solid #2c3e50;
    padding-left: 20px;
}

header nav ul li:first-child {
    border-left: none;
}

header nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    color: #00AEEF;
    background-color: #2c3e50;
    border-color: #00AEEF;
    box-shadow: inset 0px 0px 5px #000;
}

.video-grid {
    display: grid;
    gap: 20px;
    padding: 20px;
}

/* 기본적으로 4열 그리드 */
.video-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* 화면 너비가 1200px 이하일 때 3열 그리드 */
@media screen and (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 화면 너비가 900px 이하일 때 2열 그리드 */
@media screen and (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 화면 너비가 600px 이하일 때 1열 그리드 */
@media screen and (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-item {
    text-align: center;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}

.video-item h3 {
    font-size: 0.9em;
    margin: 10px 0 0;
    color: #333;
}

.video-item a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.video-item a:hover {
    color: #00AEEF;
}

.video-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #000;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 80%;
    max-width: 1200px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.modal-content video {
    width: 100%;
    height: auto;
    display: block;
}

.close {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #00AEEF;
    text-decoration: none;
    cursor: pointer;
}

.modal-content video::-webkit-media-controls-panel {
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.modal-content video::-webkit-media-controls-play-button {
    background-color: #00AEEF;
    border-radius: 50%;
}

.modal-content video::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

@keyframes modalFadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

.modal {
    animation: modalFadeIn 0.3s;
}

.modal-description {
    color: #fff;
    padding: 15px;
    font-size: 1rem;
    text-align: left;
    line-height: 1.5;
    background-color: rgba(0, 0, 0, 0.8);
}