/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #1d1d1f;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 배경 애니메이션을 위한 추가 레이어 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.05) 0%, 
        rgba(255,255,255,0.02) 50%, 
        rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    z-index: -1;
}

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

/* 템플릿 선택 섹션 */
.template-selector {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    margin: 0 auto 30px auto;
    max-width: 900px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.template-selector h3 {
    margin: 0 0 20px 0;
    color: #1d1d1f;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.template-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.template-option {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.template-option:hover {
    transform: translateY(-3px);
}

.template-option input[type="radio"] {
    display: none;
}

.template-card {
    display: block;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 140px;
}

.template-option input[type="radio"]:checked + .template-card {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 
        0 0 0 2px rgba(0, 122, 255, 0.2),
        0 4px 12px rgba(0, 122, 255, 0.3);
}

.template-name {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
    font-size: 16px;
}

.template-desc {
    display: block;
    font-size: 12px;
    color: rgba(29, 29, 31, 0.6);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1d1d1f;
    font-size: 2.8rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(255,255,255,0.8);
    background: linear-gradient(135deg, #1d1d1f, #424245, #1d1d1f);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
    cursor: default;
    transition: transform 0.3s ease;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

h1:hover {
    transform: scale(1.05);
}

.card-creator {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-width: 900px;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.card-creator:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation-play-state: paused;
}

.card-preview {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-preview:hover {
    transform: scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.template-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.template-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.upload-preview img:hover {
    transform: scale(1.05);
}

.text-display {
    position: absolute;
    color: #000000;
    font-size: 19px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 3;
    max-width: 25%;
    word-wrap: break-word;
    line-height: 1.2;
}

.text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.text-display {
    position: absolute;
    color: #000000;
    font-size: 19px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 3;
    max-width: 25%;
    word-wrap: break-word;
    line-height: 1.2;
}

#introDisplay {
    position: absolute;
    color: #000000;
    font-size: 19px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 3;
    max-width: 25%;
    word-wrap: break-word;
    line-height: 1.2;
    white-space: pre-line;
}

#introDisplay.template2-intro {
    max-width: 30%;
}

#nameDisplay, #characterNameDisplay {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.check-area {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.check-area:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 저장 시 체크 영역 스타일 */
.check-area.saving {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
}

.check-area.saving:hover {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
}

.check-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.input-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.upload-section {
    text-align: center;
}

.input-controls > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-controls label {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 14px;
    margin-bottom: 5px;
}

.name-input, .intro-input {
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 16px;
    transition: all 0.3s ease;
    color: #1d1d1f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.name-input::placeholder, .intro-input::placeholder {
    color: rgba(29, 29, 31, 0.6);
}

.name-input:focus, .intro-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.intro-input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #003D99);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#imageUpload {
    display: none;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal h2 {
    margin: 0 0 25px 0;
    color: #1d1d1f;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

/* Cropper 컨테이너 스타일 */
.cropper-container {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.cropper-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 2px dashed #dee2e6;
}

#cropperImage {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Cropper 레이아웃 */
.cropper-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.cropper-section, .preview-section {
    flex: 1;
}

.cropper-section h3, .preview-section h3 {
    margin: 0 0 15px 0;
    color: #1d1d1f;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* 미리보기 컨테이너 */
.preview-container {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    max-height: 400px;
    overflow: hidden;
}

.preview-card {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.preview-upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.preview-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.preview-template-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
    display: block;
}

.preview-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.preview-text-display {
    position: absolute;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 3;
    max-width: 25%;
    word-wrap: break-word;
    line-height: 1.2;
}

.preview-check-area {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.preview-check-image {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

/* Cropper 컨트롤 스타일 */
.cropper-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.control-group label {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 14px;
    margin: 0;
}

.control-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #003D99);
}

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

.cropper-hint {
    text-align: center;
    color: rgba(29, 29, 31, 0.7);
    font-size: 14px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-buttons button {
    padding: 12px 30px;
    font-size: 16px;
}

#applyImageAdjust {
    background: linear-gradient(135deg, #34C759, #28A745);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

#applyImageAdjust:hover {
    background: linear-gradient(135deg, #28A745, #1E7E34);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

#cancelImageAdjust {
    background: linear-gradient(135deg, #FF3B30, #DC3545);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

#cancelImageAdjust:hover {
    background: linear-gradient(135deg, #DC3545, #C82333);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

/* Cropper.js 커스텀 스타일 */
.cropper-view-box,
.cropper-face {
    border-radius: 0;
}

.cropper-line,
.cropper-point {
    background-color: #007AFF;
}

.cropper-bg {
    background-color: rgba(0, 122, 255, 0.1);
}

/* SweetAlert2 Toast 커스터마이징 */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swal2-toast {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important, inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    animation: toastSlideIn 0.3s ease-out !important;
    padding: 20px 24px !important;
    min-height: 80px !important;
}

.swal2-toast .swal2-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1d1d1f !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.swal2-toast .swal2-icon {
    width: 24px !important;
    height: 24px !important;
    margin: 0 10px 0 0 !important;
}

.swal2-toast .swal2-icon-success {
    border-color: #34c759 !important;
}

.swal2-toast .swal2-icon-success [class^="swal2-success-line"] {
    background-color: #34c759 !important;
}

.swal2-toast .swal2-icon-error {
    border-color: #ff3b30 !important;
}

.swal2-toast .swal2-icon-error .swal2-x-mark {
    color: #ff3b30 !important;
}

.swal2-toast .swal2-icon-info {
    border-color: #007aff !important;
    color: #007aff !important;
}

.swal2-timer-progress-bar {
    background: #007aff !important;
}

/* 메인 레이아웃 */
.main-layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.preview-section {
    flex: 1;
    max-width: 600px;
}

.controls-section {
    flex: 1;
    max-width: 500px;
    position: sticky;
    top: 20px;
}

/* 템플릿 컨테이너도 투명하게 */
.template-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 텍스트 오버레이도 투명하게 */
.text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 입력 컨트롤 스타일 수정 */
.input-controls {
    display: flex;
        flex-direction: column;
        gap: 15px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    height: fit-content;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 122, 255, 0.3) transparent;
}

/* 웹킷 브라우저용 스크롤바 스타일 */
.input-controls::-webkit-scrollbar {
    width: 8px;
}

.input-controls::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.input-controls::-webkit-scrollbar-thumb {
    background: rgba(0, 122, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.input-controls::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 122, 255, 0.5);
}

/* 업로드 버튼 스타일 */
.upload-btn {
        width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #003D99);
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .preview-section {
        max-width: 100%;
    }
    
    .controls-section {
        max-width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .main-layout {
        gap: 15px;
    }
    
    .input-controls {
        padding: 20px;
        max-height: 70vh;
    }
    
    .card-preview {
        max-width: 100%;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .cropper-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .template-container {
        aspect-ratio: 16/9;
    }
    
    .template-image {
        object-fit: cover;
    }
    
    .upload-preview img {
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .input-controls {
        padding: 20px;
        max-height: 60vh;
    }
    
    .template-container {
        aspect-ratio: 4/3;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .template-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .template-card {
        min-width: auto;
    }
}

/* 폰트 옵션 스타일 */
.font-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.font-option {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.font-option:hover {
    transform: translateY(-2px);
}

.font-option input[type="radio"] {
    display: none;
}

.font-button {
    display: block;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.font-name {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
    font-size: 14px;
}

.font-preview {
    display: block;
    font-size: 20px;
    color: rgba(29, 29, 31, 0.8);
    font-weight: 700;
}

.font-option input[type="radio"]:checked + .font-button {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 
        0 0 0 2px rgba(0, 122, 255, 0.2),
        0 4px 12px rgba(0, 122, 255, 0.3);
}

.font-option input[type="radio"]:checked + .font-button .font-name {
    color: #007AFF;
}

.font-option input[type="radio"]:checked + .font-button .font-preview {
    color: #007AFF;
}

.font-option:hover .font-button {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-1px);
}

.font-option:hover .font-button .font-preview {
    color: #007AFF;
}

@media (max-width: 768px) {
    .font-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .font-button {
        min-width: auto;
        padding: 12px;
    }
    
    .font-preview {
        font-size: 18px;
    }
}

/* 업로드 팁 스타일 */
.upload-tip {
    display: block;
    color: rgba(29, 29, 31, 0.6);
    font-size: 12px;
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.upload-tip:hover {
    background: rgba(255, 255, 255, 0.8);
    color: rgba(29, 29, 31, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .upload-tip {
        font-size: 11px;
        padding: 8px;
        margin-top: 6px;
    }
}

/* 데스크톱 권장 안내 */
.desktop-notice {
    background: rgba(255, 193, 7, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 0 auto 25px auto;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.desktop-notice p {
    margin: 5px 0;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .desktop-notice {
        margin: 0 auto 20px auto;
        padding: 12px;
    }
    
    .desktop-notice p {
        font-size: 13px;
    }
}

/* 개발자 링크 */
.developer-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    text-align: center;
    padding: 0;
}

.twitter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.twitter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.8);
    color: #007AFF;
}

.twitter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.twitter-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.twitter-btn:hover .twitter-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .developer-link {
        bottom: 15px;
        right: 15px;
        padding: 0;
    }
    
    .twitter-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .twitter-icon {
        width: 16px;
        height: 16px;
    }
}
 
/* 색상 옵션 스타일 */
.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-option {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.color-option:hover {
    transform: translateY(-2px);
}

.color-option input[type="radio"] {
    display: none;
}

.color-button {
    display: block;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-name {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-size: 14px;
}

.color-preview {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-option input[type="radio"]:checked + .color-button {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2), 0 4px 12px rgba(0, 122, 255, 0.3);
}

.color-option input[type="radio"]:checked + .color-button .color-name {
    color: #007AFF;
}

.color-option:hover .color-button {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .color-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .color-button {
        min-width: auto;
        padding: 12px;
    }
    
    .color-preview {
        width: 25px;
        height: 25px;
    }
}
 
/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .cropper-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .template-container {
        aspect-ratio: 16/9;
    }
    
    .template-image {
        object-fit: cover;
    }
    
    .upload-preview img {
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .input-controls {
        padding: 20px;
    }
    
    .template-container {
        aspect-ratio: 4/3;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .template-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .template-card {
        min-width: auto;
    }
}
 
/* 커스텀 색상 입력 스타일 */
.custom-color-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.custom-color-label {
    display: block;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 14px;
    margin-bottom: 10px;
}

.custom-color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-color-picker {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.custom-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.custom-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.custom-color-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
    font-family: monospace;
    color: #1d1d1f;
    transition: all 0.3s ease;
}

.custom-color-input::placeholder {
    color: rgba(29, 29, 31, 0.5);
}

.custom-color-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.custom-color-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-color-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #003D99);
}

.custom-color-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

@media (max-width: 768px) {
    .custom-color-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .custom-color-picker {
        width: 100%;
        height: 50px;
    }
    
    .custom-color-input {
        width: 100%;
    }
    
    .custom-color-btn {
        width: 100%;
    }
}
 
/* 모바일 경고 스타일 */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-warning-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.mobile-warning-content h3 {
    margin: 0 0 20px 0;
    color: #1d1d1f;
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-warning-content p {
    margin: 10px 0;
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.5;
}

.mobile-warning-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-direction: column;
}

.warning-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    color: #1d1d1f;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.warning-btn.primary {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    border-color: #007AFF;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.warning-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.warning-btn.primary:hover {
    background: linear-gradient(135deg, #0056CC, #003D99);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

/* 데스크탑 모드 가이드 스타일 */
.desktop-mode-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.guide-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.guide-content h3 {
    margin: 0 0 25px 0;
    color: #1d1d1f;
    font-size: 1.5rem;
    font-weight: 600;
}

.guide-steps {
    margin: 25px 0;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    text-align: left;
}

.step-number {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.guide-step p {
    margin: 0;
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.4;
}

.guide-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    margin-top: 20px;
}

.guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    background: linear-gradient(135deg, #0056CC, #003D99);
}

@media (max-width: 480px) {
    .mobile-warning-content,
    .guide-content {
        padding: 25px;
        margin: 10px;
    }
    
    .mobile-warning-buttons {
        gap: 10px;
    }
    
    .guide-step {
        gap: 12px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}
 