/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    position: relative;
}

/* AI 배경 요소 추가 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 50%; /* 너비 증가 */
    height: 100%;
    background-image: url('ai-background.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    opacity: 0.25; /* 투명도 크게 증가 */
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1; /* 배경 위에 콘텐츠 표시 */
}

/* 헤더 */
header {
    background-color: #62c4f0;
    background-image: linear-gradient(to right, #62c4f0, rgba(98, 196, 240, 0.8)), url('ai-header-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

/* AI 헤더 효과 요소 */
header::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(230, 25, 60, 0.3) 0%, rgba(26, 63, 118, 0.1) 70%, transparent 100%);
    border-radius: 50%;
    animation: float 8s infinite alternate ease-in-out;
    z-index: 0;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    50% { transform: translate(-20px, 10px) scale(1.1); opacity: 0.3; }
    100% { transform: translate(20px, -10px) scale(0.9); opacity: 0.2; }
}

/* 로고 스타일 수정 */
.logo {
    display: flex;
    align-items: center;
    padding-left: 20px;
    position: relative;
    z-index: 1;
}

.logo-image {
    height: 35px; /* 로고 이미지 높이 조정 */
    width: auto;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.logo span {
    font-size: 24px;
    font-weight: bold;
    color: #e6193c;
    margin-right: 5px;
}

.logo .korea {
    font-size: 16px;
    color: #333;
}

/* 진행 표시줄 */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px auto;
    max-width: 600px;
    position: relative;
}

.progress-line {
    position: absolute;
    height: 4px;
    background-color: #ccc;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-active {
    position: absolute;
    height: 4px;
    background-color: #1a3f76;
    background-image: linear-gradient(to right, #1a3f76, #62c4f0);
    width: 33.33%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px rgba(98, 196, 240, 0.7);
}

.step {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    position: relative;
    z-index: 3;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.step.active {
    background-color: #1a3f76;
    background-image: radial-gradient(#1a3f76, #152f58);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(26, 63, 118, 0.5);
}

/* 스텝 텍스트 색상 수정 */
.step-label {
    position: absolute;
    top: 70px;
    text-align: center;
    width: 150px;
    margin-left: -30px;
    font-weight: bold;
    color: #333; /* 텍스트 색상 추가 */
}

/* 메인 타이틀과 스텝 레이블 간격 추가 */
.main-title {
    text-align: center;
    font-size: 32px;
    margin: 160px 0 40px; /* 상단 여백 증가 */
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* AI 타이틀 효과 */
.main-title::after {
    content: "AI";
    position: relative;
    margin-left: 10px;
    font-size: 0.8em;
    background: linear-gradient(45deg, #62c4f0, #e6193c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 5px;
    border-radius: 5px;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.7;
        text-shadow: 0 0 5px rgba(98, 196, 240, 0.7);
    }
    to {
        opacity: 1;
        text-shadow: 0 0 10px rgba(230, 25, 60, 0.9);
    }
}

.subtitle {
    text-align: center;
    font-size: 24px;
    margin: 30px 0;
}

/* 돌아가기 링크 스타일 */
.back-link {
    margin: -20px 0 20px 0;
    text-align: left;
}

.back-link a {
    color: #1a3f76;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #e6193c;
    text-decoration: underline;
}

/* 카드 스타일 */
.card-container {
    display: flex;
    justify-content: space-around;
    margin: 40px 0;
    flex-wrap: wrap;
    position: relative;
}

/* AI 배경 효과 추가 */
.card-container::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-image: url('ai-circuit.png'); /* 추가할 회로 이미지 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right top;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 15px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* AI 이펙트 추가 */
.card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(98, 196, 240, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card.pink {
    background-color: #f8d7e9;
}

.card.green {
    background-color: #a5e9ad;
}

.card.blue {
    background-color: #c2e7ff;
}

.card-title {
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    font-size: 18px;
}

.card-content {
    text-align: center;
    margin-top: 15px;
}

.icon-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.icon {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

/* 아이콘 빛나는 효과 */
.icon svg path {
    transition: all 0.3s ease;
}

.card:hover .icon svg path {
    filter: drop-shadow(0 0 3px rgba(98, 196, 240, 0.8));
}

/* 정보 박스 */
.info-box {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* AI 효과 요소 추가 */
.info-box::before {
    content: "";
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-image: url('ai-pattern.png'); /* 추가할 AI 패턴 이미지 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right bottom;
    opacity: 0.07;
    z-index: 0;
    pointer-events: none;
}

.info-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #1a3f76;
    position: relative;
    z-index: 1;
}

.info-title img {
    width: 50px;
    margin-right: 15px;
}

.info-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.info-item {
    text-align: center;
    margin: 20px;
    width: 300px;
}

.info-item img {
    width: 100px;
    margin-bottom: 15px;
}

/* 단계별 콘텐츠 */
.step-content {
    margin-top: 40px;
}

/* 채팅 컨테이너 */
.chat-container {
    display: flex;
    margin: 20px 0;
    position: relative;
}

/* AI 채팅 이펙트 */
.chat-container::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 30px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(165, 233, 173, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s infinite alternate ease-in-out;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.chat-sidebar {
    flex: 1;
    background-color: #a5e9ad;
    background-image: linear-gradient(to bottom right, #a5e9ad, #8bd994);
    padding: 20px;
    border-radius: 15px 0 0 15px;
    position: relative;
    z-index: 1;
}

.chat-content {
    flex: 2;
    background-color: white;
    padding: 20px;
    border-radius: 0 15px 15px 0;
    position: relative;
    z-index: 1;
}

.chat-message {
    margin: 15px 0;
}

.chat-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 30px;
    font-size: 16px;
    margin-top: 10px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #62c4f0;
    box-shadow: 0 0 5px rgba(98, 196, 240, 0.5);
}

.chat-response {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    position: relative;
    border-top-left-radius: 0;
}

/* AI 응답 효과 */
.chat-response::before {
    content: "AI";
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    background: linear-gradient(45deg, #62c4f0, #1a3f76);
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 업로드 컨테이너 */
.upload-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.upload-option {
    background-color: #f0f7ff;
    border-radius: 15px;
    padding: 20px;
    width: 31%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.upload-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* AI 효과 요소 */
.upload-option::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(98, 196, 240, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-option:hover::after {
    opacity: 1;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.upload-title {
    font-weight: bold;
    margin-bottom: 15px;
}

.upload-desc {
    text-align: left;
    margin-top: 15px;
}

.upload-desc li {
    list-style: none;
    margin: 5px 0;
    position: relative;
    padding-left: 20px;
}

.upload-desc li:before {
    content: "✓";
    color: #4CAF50;
    position: absolute;
    left: 0;
}

/* 버튼 */
.btn {
    background-color: #1a3f76;
    background-image: linear-gradient(to right, #1a3f76, #2c5ea3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:hover {
    background-color: #152f58;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 63, 118, 0.3);
}

/* 버튼 AI 효과 */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.btn:hover::after {
    left: 100%;
}

.btn.outline {
    background-color: transparent;
    background-image: none;
    border: 1px solid #1a3f76;
    color: #1a3f76;
}

.btn.outline:hover {
    background-color: #f0f7ff;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* 양식 그룹 */
.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #62c4f0;
    box-shadow: 0 0 5px rgba(98, 196, 240, 0.5);
}

.checkbox-group {
    margin: 10px 0;
}

/* 파일 업로드 */
.file-upload {
    border: 2px dashed #ccc;
    padding: 30px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    margin: 20px 0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-upload:hover {
    border-color: #1a3f76;
    background-color: #f8f9fa;
}

/* 파일 업로드 AI 효과 */
.file-upload::after {
    content: "";
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-upload:hover::after {
    opacity: 1;
}

.file-upload p {
    margin: 10px 0;
}

.file-upload .small {
    font-size: 12px;
    color: #777;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
}

.image-preview {
    position: relative;
    margin: 5px;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-image:hover {
    background-color: rgba(230, 25, 60, 0.2);
}

.selected-file {
    background-color: #f0f7ff;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-file p {
    margin: 0;
}

/* AI 생성 이미지 */
.ai-generated-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.ai-generated-images img {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-generated-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 완료 메시지 */
.completion-message {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

/* AI 완료 효과 */
.completion-message::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse-green 3s infinite alternate;
}

@keyframes pulse-green {
    from { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.completion-message img {
    margin-bottom: 20px;
}

.completion-message h3 {
    margin-bottom: 15px;
    color: #4CAF50;
}

.registration-info {
    background-color: #f0f7ff;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.registration-info h3 {
    margin-bottom: 15px;
}

.registration-info ul {
    list-style: none;
}

.registration-info li {
    margin: 10px 0;
}

/* 로딩 오버레이 */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* AI 로딩 효과 */
#loading-overlay::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(98, 196, 240, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: pulse-loading 2s infinite alternate;
}

@keyframes pulse-loading {
    from { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1a3f76;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* AI 로딩 텍스트 효과 */
#loading-overlay p {
    position: relative;
    z-index: 1;
}

#loading-overlay p::after {
    content: "";
    display: inline-block;
    width: 0;
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
    100% { content: ""; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 유틸리티 클래스 */
.hidden {
    display: none !important;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .upload-option {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        border-radius: 15px 15px 0 0;
    }
    
    .chat-content {
        border-radius: 0 0 15px 15px;
    }
    
    .progress-bar {
        width: 90%;
    }
    
    .step-label {
        font-size: 14px;
        width: 100px;
        margin-left: -20px;
    }
    
    .info-title {
        font-size: 20px;
    }
    
    .card {
        width: 100%;
    }
    
    /* 모바일에서 AI 배경 효과 조정 */
    body::before {
        width: 100%;
        background-position: center top;
        opacity: 0.15; /* 모바일에서도 투명도 증가 */
    }
}