/* 글꼴 선택 개선 */
#fontFamily {
    font-size: 14px;
}

#fontFamily optgroup {
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
    padding: 8px 0;
}

#fontFamily option {
    font-weight: normal;
    padding: 4px 8px;
}

/* 한글 폰트 옵션 스타일 */
optgroup[label="한글 폰트"] option {
    font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
}

/* 세리프 폰트 옵션 스타일 */
optgroup[label="세리프 (Serif)"] option {
    font-family: Georgia, serif;
}

/* 산세리프 폰트 옵션 스타일 */
optgroup[label="산세리프 (Sans-serif)"] option {
    font-family: Arial, sans-serif;
}

/* 모노스페이스 폰트 옵션 스타일 */
optgroup[label="모노스페이스"] option {
    font-family: "Courier New", monospace;
}

/* 미리보기 영역 */
.preview-container {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#previewCanvas {
    max-width: 100%;
    max-height: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.font-size-value {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    color: #007bff;
}

.form-range {
    flex: 1;
}

.form-control-color {
    height: 38px;
}

.download-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .row.mb-3 {
        margin-bottom: 1rem !important;
    }

    .col-md-6 {
        margin-bottom: 1rem;
    }

    #previewCanvas {
        max-height: 250px;
    }

    .preview-container {
        min-height: 200px;
    }
}

/* 애니메이션 효과 */
#generateBtn {
    transition: all 0.3s ease;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.download-section {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Text to Image Converter Styles */
.preview-container {
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

#previewCanvas {
    max-width: 100%;
    max-height: 400px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.font-size-value {
    min-width: 50px;
    display: inline-block;
    font-weight: bold;
    color: #495057;
}

.form-control-color {
    width: 60px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    cursor: pointer;
}

.download-section {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.download-section .btn {
    transition: all 0.3s ease;
}

.download-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 광고 관련 스타일 */
.ad-info {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.ad-info .ad-icon {
    color: #1976d2;
    margin-right: 8px;
}

/* 알림 메시지 스타일 */
.alert {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .preview-container {
        min-height: 200px;
        padding: 15px;
    }

    #previewCanvas {
        max-height: 250px;
    }

    .download-section .btn {
        margin-bottom: 10px;
    }
}

/* 로딩 애니메이션 */
.generating {
    opacity: 0.7;
    pointer-events: none;
}

.generating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}