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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.output-section {
    background: white;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.email-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.email-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-info div {
    margin-bottom: 5px;
    font-size: 14px;
}

.email-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background: #5a6268;
}

.action-btn.success {
    background: #28a745;
}

.action-btn.success:hover {
    background: #218838;
}

.email-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.email-body {
    line-height: 1.6;
    color: #333;
}

.placeholder-text {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-top: 50px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
}

.btn:hover {
    background: #5a6fd8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .email-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* 스크롤바 스타일링 */
.email-content::-webkit-scrollbar {
    width: 8px;
}

.email-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.email-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.email-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 탭 스타일 */
.mail-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.tab-btn {
    flex: 1;
    padding: 12px 0;
    background: #f1f3f5;
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.08);
}
#tab-content-normal, #tab-content-reply {
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
    border-top: none;
    margin-bottom: 20px;
}

.mode-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.mode-group label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}
.mode-group input[type="radio"] {
    margin-right: 6px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
}
.radio-label input[type="radio"] {
    margin-right: 4px;
}
.radio-label span {
    margin-right: 10px;
}

#receivedMail {
    width: 100%;
    min-height: 350px;
    font-size: 1.1rem;
    padding: 16px 18px;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    resize: vertical;
    box-sizing: border-box;
} 