/* モーダルウィンドウのスタイル */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-container.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: var(--dark-secondary);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.3);
    z-index: 1002;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    z-index: 1003;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--neon-magenta);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.modal-text {
    padding: 0 10px;
}

.modal-text h3 {
    color: var(--neon-blue);
    margin-bottom: 15px;
    font-size: 24px;
}

.modal-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 制作例カードのスタイル更新 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.work-card {
    background-color: var(--dark-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.work-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 25px rgba(76, 201, 240, 0.3);
}

.work-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-content {
    padding: 20px;
    color: var(--text-light);
}

.work-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--neon-blue);
}

.work-content p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-text h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .work-image {
        height: 180px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 20px;
    }
}