﻿/* Font Preview CSS */

/* 전체 레이아웃 */
.preview-section {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.preview-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.input-area {
    background: var(--card-bg, #f3f4f6);
    border: 2px solid var(--primary-color, #0EA5E9);
    border-radius: 16px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.fonts-area {
}

.input-group {
    margin-bottom: 18px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #1f2937;
}

.preview-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    transition: all 0.3s ease;
}

.preview-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.font-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.font-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.font-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.font-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.font-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.slider-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-color);
}

.color-picker {
    width: 100%;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-picker:hover {
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.btn-reset {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), #0284C7);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

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

/* 폰트 목록 영역 */
.fonts-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f2937;
}

.fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.font-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.font-card.active {
    background: linear-gradient(135deg, var(--primary-color, #0EA5E9), #0284C7);
    color: white;
    border-color: transparent;
}

.font-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-word;
}

.font-card-preview {
    font-size: 16px;
    line-height: 1.4;
    opacity: 0.8;
}

.font-card.active .font-card-preview {
    opacity: 0.95;
}

/* 미리보기 박스 */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.current-font {
    background: linear-gradient(135deg, var(--primary-color), #10B981);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.preview-content {
    flex: 1;
    font-size: 32px;
    line-height: 1.5;
    color: #1f2937;
    word-break: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: slideUp 0.6s ease-out;
}

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

/* 정보 섹션 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.info-item {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.info-label {
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
}

.info-value {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    font-family: '"'"'Courier New'"'"', monospace;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .preview-section {
        grid-template-columns: 1fr;
    }

    .input-area {
        position: static;
    }

    .fonts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .preview-section {
        gap: 16px;
    }

    .input-area {
        padding: 16px;
    }

    .fonts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .font-card {
        padding: 12px;
    }

    .font-card-name {
        font-size: 12px;
    }

    .font-card-preview {
        font-size: 14px;
    }

    .preview-box {
        padding: 16px;
        min-height: 150px;
    }

    .preview-content {
        font-size: 24px;
        line-height: 1.4;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-item {
        padding: 10px 12px;
    }

    .info-label {
        font-size: 12px;
    }

    .info-value {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .preview-section {
        gap: 12px;
    }

    .input-area {
        padding: 12px;
    }

    .input-group {
        margin-bottom: 14px;
    }

    .input-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .preview-input {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 60px;
    }

    .slider-value {
        font-size: 12px;
        min-width: 45px;
    }

    .font-slider {
        height: 5px;
    }

    .font-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .font-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }

    .fonts-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .fonts-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .font-card {
        padding: 10px;
        border-radius: 8px;
    }

    .font-card-name {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .font-card-preview {
        font-size: 12px;
        line-height: 1.3;
    }

    .preview-box {
        padding: 12px;
        min-height: 120px;
    }

    .preview-header {
        margin-bottom: 12px;
        padding-bottom: 12px;
        gap: 8px;
    }

    .preview-header h3 {
        font-size: 14px;
    }

    .current-font {
        font-size: 11px;
        padding: 4px 10px;
    }

    .preview-content {
        font-size: 18px;
        line-height: 1.4;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-item {
        padding: 8px 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .info-label {
        font-size: 11px;
    }

    .info-value {
        font-size: 12px;
    }
}
