body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef2f3; /* 부드러운 회색 배경 */
    color: #333;
}

header {
    background: #007bff; /* 부드러운 파란색 */
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header input[type="text"] {
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #007bff; /* 파란색 경계 */
    border-radius: 5px;
    width: 60%;
    transition: border-color 0.3s;
}

header input[type="text"]:focus {
    border-color: #0056b3; /* 포커스 시 어두운 파란색으로 변경 */
    outline: none;
}

header button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #fff;
    color: #007bff; /* 파란색 */
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

header button:hover {
    background-color: #0056b3; /* 어두운 파란색 */
    color: white; /* 흰색으로 변경 */
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.video-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin: 10px;
    width: 300px;
    overflow: hidden;
    transition: transform 0.3s;
}

.video-item:hover {
    transform: translateY(-5px); /* 약간 위로 이동 */
}

.video-item img {
    width: 100%;
    border-bottom: 5px solid #007bff; /* 파란색 */
}

.video-item h3 {
    padding: 10px;
    margin: 0;
    font-size: 1.2em;
    color: #444; /* 다크 그레이 */
}

.video-item p {
    padding: 0 10px 10px;
    font-size: 0.9em;
    color: #666;
}

.modal {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 어두운 배경 */
    justify-content: center;
    align-items: center;
    opacity: 0; /* 초기 투명도 */
    transition: opacity 0.3s ease; /* 투명도 전환 */
}

.modal.show {
    display: flex; /* 표시할 때 flex로 설정 */
    opacity: 1; /* 완전히 불투명하게 */
}

#player {
    border: none;
    border-radius: 8px;
    width: 0; /* 초기 너비 */
    height: 0; /* 초기 높이 */
    transition: width 0.5s ease, height 0.5s ease; /* 크기 전환 */
}

.modal.show #player {
    width: 80%; /* 최종 너비 */
    height: 80%; /* 최종 높이 */
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}
