/* 강원대학교 차세대반도체학과 메일 생성기 스타일 - 현대적 대학 디자인 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 헤더 스타일 - 현대적 대학 느낌 */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-section .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 400;
}

.contact-info {
    text-align: right;
    font-size: 1.1rem;
    color: #1e40af;
    font-weight: 500;
}

.contact-info > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 메일주소 복사 버튼 스타일 */
.copy-email-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    backdrop-filter: blur(10px);
}

.copy-email-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.copy-email-btn:active {
    transform: translateY(0);
}

/* 메인 콘텐츠 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 템플릿 선택기 - 카드 스타일 */
.template-selector {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.template-selector h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.template-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.template-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

.template-btn:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.template-btn.active {
    border-color: #1e40af;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.template-btn i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* 폼 섹션 */
.form-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* 폼 콘텐츠 */
.form-content-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2.5rem;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.input-group label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    color: #374151;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.input-group small {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* 입력 필드에 예시 스타일 */
.input-group input::placeholder {
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 400;
}

.input-group input:focus::placeholder {
    color: #d1d5db;
}

/* placeholder 입력 필드 특별 스타일 */
.placeholder-input {
    transition: all 0.2s ease;
}

.placeholder-input:focus {
    background: #ffffff !important;
}

.placeholder-input::placeholder {
    color: #6b7280;
    font-style: italic;
    font-weight: 400;
}

/* 동적 필드 스타일 */
.dynamic-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 제출 버튼 스타일 */
.submit-section {
    text-align: center;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.submit-btn {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.submit-btn i {
    margin-right: 0.5rem;
}

/* 미리보기 섹션 */
.preview-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid #f1f5f9;
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.preview-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.copy-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.copy-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.copy-btn.copy-title {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.copy-btn.copy-title:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.mail-preview {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.8;
}

.mail-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    word-break: break-word;
}

.mail-body {
    font-size: 1.1rem;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 뒤로가기 버튼 스타일 */
.preview-actions {
    text-align: center;
}

.back-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.3);
}

.back-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.back-btn i {
    margin-right: 0.5rem;
}

/* 푸터 */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .title-section h1 {
        font-size: 2rem;
    }
    
    .title-section .subtitle {
        font-size: 1.1rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .template-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-content-area {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.5rem;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .copy-buttons {
        justify-content: center;
    }
    
    .mail-preview {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .template-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .template-btn i {
        font-size: 1.5rem;
    }
    
    .submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .copy-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.container > * {
    animation: fadeIn 0.6s ease-out;
}

/* 복사 성공 메시지 - 현대적 스타일 */
.copy-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.3);
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.copy-success i {
    margin-right: 0.5rem;
}