/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   인트로 화면 스타일
========================= */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #003300;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 2rem;
}

.language-selector {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 0.5rem;
    min-width: 120px;
    overflow: hidden;
    display: none;
    z-index: 10001;
}

.language-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.language-flag {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.language-option {
    padding: 0.75rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.intro-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.intro-logo .logo-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

.intro-logo h1 {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.intro-text {
    margin: 2rem 0;
}

.slogan {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.start-btn {
    background: linear-gradient(135deg, #21a98d 0%, #bd3d3c 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(33, 169, 141, 0.3);
    min-width: 200px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(33, 169, 141, 0.4);
}

/* =========================
   인증 화면 스타일
========================= */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    padding: 2rem;
}

.auth-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.auth-header h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.google-btn {
    border-color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
}

.google-btn:hover {
    background: rgba(66, 133, 244, 0.2);
}

.apple-btn {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.apple-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.auth-icon {
    font-size: 1.2rem;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Google 아이콘 색상 */
.google-btn .auth-icon svg {
    color: white;
}

/* Apple 아이콘 색상 */
.apple-btn .auth-icon svg {
    color: white;
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* =========================
   애니메이션
========================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   모바일 최적화
========================= */
@media (max-width: 768px) {
    .intro-logo .logo-image {
        max-width: 180px;
    }
    
    .intro-logo h1 {
        font-size: 2.8rem;
    }
    
    .slogan {
        font-size: 1.3rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .start-btn {
        padding: 0.875rem 2.5rem;
        font-size: 1rem;
    }
    
    /* 홈 화면 preview-grid 모바일 최적화 */
    .preview-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .preview-item {
        aspect-ratio: auto !important;
        min-height: auto !important;
        width: 100% !important;
    }
    
    .preview-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
    }
    
    .language-selector {
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .auth-content {
        padding: 2.5rem 2rem;
        margin: 1rem;
    }
    
    .intro-screen, .auth-screen {
        padding: 1.5rem;
    }
}

/* =========================
   새로운 메인 앱 레이아웃
========================= */
#mainApp {
    background: #1B1B1B;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-screen {
    flex: 1;
    padding-bottom: 80px; /* 글로벌 네비게이션 공간 확보 */
    overflow-y: auto;
}

/* 갤러리 화면은 네비게이션 높이만큼 하단 패딩 추가 */
#galleryScreen {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* 광고 배너 */
.ad-banner {
    background: linear-gradient(135deg, #21a98d 0%, #bd3d3c 100%);
    margin: 1rem;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(33, 169, 141, 0.3);
}

.ad-content p {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

/* 공유 이미지 미리보기 */
.shared-preview {
    padding: 1rem;
}

.preview-header {
    margin-bottom: 1rem;
}

.preview-header h2 {
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.preview-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.preview-grid::-webkit-scrollbar {
    width: 6px;
}

.preview-grid::-webkit-scrollbar-track {
    background: transparent;
}

.preview-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.preview-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.preview-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.preview-placeholder p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* 공유 이미지 프리뷰 스타일 */
.preview-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 1;
    min-height: 120px;
}

.preview-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

/* 홈 화면 스킨 컬러 오버레이 */
.preview-skin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 11px; /* preview-item border-radius보다 1px 작게 */
}

/* 홈 화면 스타일 태그 */
.preview-style-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* 홈 화면 날짜 태그 */
.preview-date-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    z-index: 3;
    backdrop-filter: blur(4px);
}


.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 0.75rem 0.5rem 0.5rem;
    color: white;
}

.preview-style {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    opacity: 0.9;
}

/* =========================
   그림 생성 화면 스타일
========================= */
.create-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 스타일 선택 버튼 */
.style-select-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.style-select-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.style-arrow {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.style-select-btn:hover .style-arrow {
    transform: translateY(1px);
}

/* 타투 스타일 선택 모달 */
.style-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    position: relative;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 1.5rem 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* 스타일 그리드 */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.style-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 1;
    min-height: 120px;
}

.style-option:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.style-option.selected {
    border-color: #21a98d;
    box-shadow: 0 0 20px rgba(33, 169, 141, 0.3);
}

.style-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
}

.style-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 0.75rem 0.5rem 0.5rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .style-preview {
        height: 100%;
    }
}

.create-header h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.create-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.create-content {
    padding: 2rem 1rem;
    padding-bottom: 12rem; /* 하단 컨트롤 패널을 위한 충분한 여백 */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    min-height: 300px;
}

.upload-section, .result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-area, .result-area {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.02);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.image-container:hover {
    opacity: 0.8;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.image-container::after {
    content: "📁 클릭해서 이미지 변경";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.image-container:hover::after {
    opacity: 1;
}

.upload-placeholder, .result-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
}

.upload-icon, .result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-placeholder p, .result-placeholder p {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.upload-placeholder span, .result-placeholder span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.4;
}

.upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 16px;
}

.result-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 16px;
}

/* 모바일에서 이미지 컨테이너 최적화 */
@media (max-width: 768px) {
    #resultImageContainer {
        width: 100%;
        height: 100%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 16px;
        overflow: hidden;
    }
}

.conversion-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.arrow-icon {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    transform: rotate(0deg);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* 하단 고정 컨트롤 패널 */
.create-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom)); /* 글로벌 네비게이션 높이(4rem) + 여백(1rem) */
    z-index: 900;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-of-type {
    margin-bottom: 2rem;
}

.control-group label {
    display: block;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.control-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    cursor: pointer;
}

.control-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.control-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.generate-btn:disabled,
.generate-btn.disabled-state {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
}

.btn-text {
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.2rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .create-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem 1rem;
        padding-bottom: 12rem; /* 모바일에서도 하단 여백 유지 */
    }
    
    .upload-section {
        order: 0;
    }
    
    .conversion-arrow {
        order: 1;
    }
    
    .result-section {
        order: 2;
    }
    
    .arrow-icon {
        transform: rotate(90deg);
    }
    
    .upload-area, .result-area {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }
    
    .create-controls {
        padding: 1rem;
        padding-bottom: calc(5rem + env(safe-area-inset-bottom));
    }
    
    /* 모바일에서도 PC와 동일한 upload-controls 레이아웃 유지 */
    .upload-controls {
        display: flex !important;
        flex-direction: column !important;
        margin-top: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .controls-title {
        margin-bottom: 0.8rem !important;
        text-align: center !important;
    }
    
    .controls-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .style-preview-container {
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        width: 80px !important;
        align-self: stretch !important;
        overflow: hidden !important;
        line-height: 0 !important;
        position: relative !important;
    }
    
    .controls-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .current-style-preview {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
}

/* 추가 액션 버튼들 */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* =========================
   갤러리 화면 스타일
========================= */

.gallery-content {
    padding: 1.5rem;
}

.gallery-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-info-bar span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding-bottom: 1rem; /* 추가 여백으로 네비게이션과 완전히 분리 */
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.gallery-empty .empty-message {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.gallery-empty .empty-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
}

.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Progress bar 스타일 업데이트 */
.conversion-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-step {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-align: center;
}

/* conversionProgress가 표시될 때 resultArea 숨김 */
.conversion-progress:not([style*="display: none"]) ~ .result-section .result-area {
    display: none !important;
}

.conversion-progress.hidden {
    display: none !important;
}

/* resultImageContainer 초기 상태 강제 숨김 */
#resultImageContainer {
    display: none !important;
}

#resultImageContainer.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 타투 이미지 생성 완료 시 result-area 높이 자동 조절 */
.result-area.image-loaded {
    aspect-ratio: unset !important;
    height: auto !important;
    min-height: 200px;
}

.mask-info-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mask-counter {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.mask-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mask-stats span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* 업로드 영역 컨트롤 - 항상 수평으로 배치 */


.upload-control-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.upload-control-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.upload-control-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.upload-control-select option:disabled {
    background: #2a2a3e;
    color: rgba(255, 255, 255, 0.3);
}

/* upload-control 하위 요소들을 수직으로 정렬 */
.upload-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1; /* 같은 너비 사용 */
}

.upload-control-group label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.upload-control-select {
    width: 100%;
}

/* 모바일에서도 수평으로 유지하되 좁은 공간 최적화 */
@media (max-width: 768px) {
    .upload-control-group {
        flex: 1;
        min-width: 0; /* 텍스트 오버플로 방지 */
    }
    
    .upload-control-group label {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .upload-control-select {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
        min-height: 44px;
    }
    
    .style-select-btn {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
        min-height: 44px;
    }
}

/* 스킨 컬러 선택 - switch-container와 동일한 구조 */
.upload-control-group.skin-color-control {
    flex-direction: row !important;
    align-items: center;
}

.skin-color-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.skin-color-label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
}

.skin-color-chips {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
    /* 모바일 브라우저 순서 보장 */
    flex-direction: row;
    justify-content: flex-start;
    /* iOS Safari 버그 방지 */
    -webkit-flex-direction: row;
    -webkit-justify-content: flex-start;
    /* RTL 대응 */
    direction: ltr;
}

.skin-color-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    /* 브라우저별 색상 렌더링 일치를 위한 속성들 */
    color-interpolation-filters: sRGB;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    /* 색상 정확도 향상 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.skin-color-chip:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.skin-color-chip.active {
    border-color: #ffffff;
    transform: scale(1.1);
}

.skin-color-chip.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .skin-color-label {
        font-size: 0.9rem;
    }
    
    .skin-color-chip {
        width: 24px;
        height: 24px;
        /* 모바일에서 순서 강제 고정 */
        flex-shrink: 0;
        -webkit-flex-shrink: 0;
    }
    
    .skin-color-chip.active::after {
        font-size: 10px;
    }
    
    .skin-color-chips {
        gap: 0.4rem;
        /* 모바일에서 강제 가로 배치 */
        flex-wrap: nowrap;
        -webkit-flex-wrap: nowrap;
        overflow-x: visible;
        /* 순서 보장 추가 */
        justify-content: flex-start;
        -webkit-justify-content: flex-start;
    }
}

/* 극소형 화면에서의 추가 보완 */
@media (max-width: 480px) {
    .skin-color-chips {
        gap: 0.3rem;
    }
    
    .skin-color-chip {
        width: 22px;
        height: 22px;
        /* 순서 보장을 위한 최소 너비 설정 */
        min-width: 22px;
    }
}

/* 삼성 브라우저 전용 수정사항 */
@supports (-webkit-touch-callout: none) {
    /* 삼성 브라우저에서 Flexbox 순서 강제 고정 */
    .skin-color-chips {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
        -webkit-justify-content: flex-start !important;
        justify-content: flex-start !important;
        /* 삼성 브라우저의 색상 렌더링 버그 방지 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: auto;
    }
    
    .skin-color-chip {
        /* 삼성 브라우저 색상 정확도 향상 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        /* 순서 강제 고정 */
        -webkit-flex-shrink: 0 !important;
        flex-shrink: 0 !important;
        -webkit-order: inherit;
        order: inherit;
    }
}

/* 삼성 브라우저 감지 및 추가 보정 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    _::-webkit-full-page-media, _:future, :root .skin-color-chip {
        /* 삼성 브라우저에서 색상 보정 */
        filter: saturate(1.0) contrast(1.0) brightness(1.0);
        -webkit-filter: saturate(1.0) contrast(1.0) brightness(1.0);
    }
}

/* 삼성 브라우저 전용 클래스 기반 스타일 */
html.samsung-browser .skin-color-chip {
    /* 색상 정확도 최대화 */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    will-change: transform;
    
    /* 순서 강제 고정 */
    -webkit-flex-shrink: 0 !important;
    flex-shrink: 0 !important;
    
    /* 색상 렌더링 최적화 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
}

html.samsung-browser .skin-color-chips {
    /* Flexbox 강제 고정 */
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    -webkit-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-justify-content: flex-start !important;
    justify-content: flex-start !important;
    
    /* 렌더링 최적화 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* 스킨 컬러 CSS 변수 정의 (브라우저 색상 일관성을 위해) */
:root {
    --skin-color-1: rgb(252, 225, 214); /* #FCE1D6 */
    --skin-color-2: rgb(255, 218, 185); /* #FFDAB9 */
    --skin-color-3: rgb(224, 172, 105); /* #E0AC69 */
    --skin-color-4: rgb(198, 134, 66);  /* #C68642 */
    --skin-color-5: rgb(141, 85, 36);   /* #8D5524 */
}

/* 투명화 이미지 배경 오버레이 */
.transparency-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    border-radius: inherit;
}

.tattoo-image-container {
    position: relative;
    display: inline-block;
}

.tattoo-image-container img {
    position: relative;
    z-index: 1;
}

/* 이미지 로딩 스피너 */
.image-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    color: #ffffff;
    text-align: center;
}

.image-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.image-loading-spinner .error-icon {
    font-size: 2rem;
    color: #ff4444;
}

/* 갤러리 로딩 스피너 */
.gallery-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.gallery-loading-spinner .spinner {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 글로벌 네비게이션 */
.global-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 1000;
}

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 60px;
}

.nav-btn.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

.nav-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-btn span {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
}

/* PC 반응형 */
@media (min-width: 769px) {
    #mainApp {
        max-width: 500px;
        margin: 0 auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .ad-banner {
        margin: 1.5rem;
    }
    
    .shared-preview {
        padding: 1.5rem;
    }
}

html {
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
    touch-action: manipulation;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1B1B1B;
    min-height: 100vh;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
}

/* 추가 모바일 미디어 쿼리 - 더 강력한 적용 */
@media (max-width: 768px), (max-device-width: 768px) {
    .preview-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .preview-item {
        aspect-ratio: auto !important;
        min-height: auto !important;
        width: 100% !important;
    }
    
    .preview-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
    }
}

/* Header styles */
.header {
    background: #000000;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

.header h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header p {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* Control panel styles */
.control-panel {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
    max-width: 1400px;
    margin: 0 auto;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: #ccc;
    font-size: 0.9rem;
}

.control-group select {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    background: #333;
    color: #fff;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #00ff88;
}

/* Button styles */
.action-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    background: #2a2a2a;
    color: #ccc;
}

.action-btn:hover:not(:disabled) {
    background: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.convert-btn {
    background: #00ff88 !important;
    color: #000 !important;
    border: none !important;
    font-weight: 600;
    border-radius: 8px;
}

.convert-btn:hover:not(:disabled) {
    background: #00e67a !important;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Workspace styles */
.main-workspace {
    flex: 1;
    display: flex;
    gap: 1rem;
    padding: 0 2rem 2rem;
    max-width: 1400px;
    overscroll-behavior: none;
    margin: 0 auto;
    width: 100%;
}

.workspace-panel {
    background: linear-gradient(145deg, #0f0f0f, #1a1a1a) !important;
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.workspace-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    opacity: 0.6;
}

.workspace-panel:hover {
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.panel-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, transparent);
    border-radius: 1px;
}

/* Upload area styles */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
    backdrop-filter: blur(10px);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.1);
}

.upload-icon {
    font-size: 4rem;
    color: #666;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.upload-btn {
    background: #333;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.upload-btn:hover {
    background: #444;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 중복 제거됨 - 위쪽 .image-container 스타일 사용 */

/* 앱 헤더 레이아웃 */
.app-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #003300;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.back-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.style-select-content {
    padding: 2rem 1.5rem;
    padding-bottom: 6rem;
}

.print-content {
    padding: 2rem 1.5rem;
    padding-bottom: 6rem;
    overflow-y: auto;
    height: calc(100vh - 80px);
}

/* 서브페이지 기본 스타일 */
#styleSelectScreen, #imageDetailScreen, #printScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #1B1B1B;
    color: #ffffff;
    z-index: 1000;
}

#styleSelectScreen .app-header-bar,
#imageDetailScreen .app-header-bar,
#printScreen .app-header-bar {
    background: #003300;
}

/* 스위치 UI 스타일 */
.switch-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.switch-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666666;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00aa00;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch:active .slider:before {
    width: 22px;
}

.app-header-logo {
    height: 32px;
    width: auto;
}

.app-header-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.app-header-title h1 {
    font-size: 1.3rem !important;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.app-header-title .title-t1 {
    color: #21a98d;
}

.app-header-title .title-t2 {
    color: #bd3d3c;
}

.gallery-user-info {
    flex: 1;
    text-align: left;
}

.gallery-username {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
}

.app-header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.app-header-actions .settings-btn {
    margin-left: 0;
}

.gallery-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    min-width: fit-content;
}

.gallery-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

.upgrade-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

/* 갤러리 설정 버튼 (ID 기반) */
#settingsBtn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto;
    height: auto;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

#settingsBtn:hover {
    color: #ffffff !important;
    transform: scale(1.1);
    background: transparent !important;
    border: none !important;
}

/* 모바일 반응형 앱 헤더 */
@media (max-width: 768px) {
    .app-header-bar {
        padding: 0.8rem 1rem;
    }
    
    .app-header-brand {
        gap: 0.6rem;
    }
    
    .app-header-logo {
        height: 28px;
    }
    
    .app-header-title {
        font-size: 1rem;
    }
    
    .gallery-username {
        font-size: 1rem;
    }
    
    .app-header-actions {
        gap: 1.2rem;
    }
    
    .app-header-actions .settings-btn {
        margin-left: 0;
    }
    
    .gallery-action-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .upgrade-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    #settingsBtn {
        font-size: 1.4rem;
    }
    
    .gallery-username {
        font-size: 1rem;
    }
}

.gallery-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 설정 화면 스타일 */
.settings-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.settings-content {
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100vh - 8rem);
}

.settings-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-item label {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.settings-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.settings-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.settings-label {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.settings-value {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.settings-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.settings-btn.danger {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.settings-btn.danger:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.5);
}

.settings-btn-icon {
    font-size: 1.2rem;
}

.settings-btn-text {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.settings-btn-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    cursor: crosshair;
    border-radius: 0px;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
}

/* Preview panel styles */
.preview-panel {
    position: relative;
}

/* Enhance canvas placeholder for modern AI feel */
.result-container {
    background: rgba(5, 5, 5, 0.8) !important;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.canvas-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: #aaa;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    padding: clamp(2rem, 6%, 3rem);
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02) !important;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.canvas-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.canvas-placeholder br {
    display: block;
    margin: 0.4em 0;
}

.canvas-placeholder-settings {
    margin: clamp(1rem, 4%, 2rem) 0;
    padding: clamp(0.75rem, 4%, 1.5rem);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    width: 85%;
    max-width: 320px;
    line-height: 1.5;
    flex-shrink: 0;
}

.canvas-placeholder-settings-title {
    font-weight: 600;
    color: #ccc;
    margin-bottom: clamp(0.5rem, 2%, 0.75rem);
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
}

.canvas-placeholder-settings-content {
    color: #888;
    font-weight: 500;
}

.canvas-placeholder-settings-content div {
    margin-bottom: 0.3rem;
}

.canvas-placeholder-settings-content span {
    font-weight: 600;
    color: #ccc;
}

.canvas-placeholder-note {
    color: #777;
    margin: clamp(0.75rem, 2.5%, 1.5rem) 0 0 0;
    display: block;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-weight: 500;
    flex-shrink: 0;
}

/* Progress and loading styles */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00e67a);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-step {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
    text-align: center;
}

.progress-container {
    text-align: center;
    padding: 2rem;
    margin-top: 1rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

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

/* Mask info panel styles */
.mask-info-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mask-counter {
    font-size: 1rem;
    color: #ccc;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mask-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
}

.resize-info {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #00ff88;
}

/* Result container styles */
.result-container {
    width: 100%;
    height: 100%;
    flex: 1;
}

.result-image {
    width: 100%;
    max-width: 100%;
    border-radius: 0px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #00ff88, #00e67a);
    color: #000;
}

.notification.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Disabled styles */
select:disabled {
    background-color: #333 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    opacity: 0.6;
}

/* Login styles */
.login-btn {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.user-name {
    color: #ccc;
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: #888;
    font-size: 0.9rem;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.social-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.social-btn:hover:before {
    left: 100%;
}

.google-btn {
    background: linear-gradient(135deg, #4285f4, #3367d6);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.google-btn:hover {
    background: linear-gradient(135deg, #3367d6, #2851a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Gallery modal styles */
.gallery-modal {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-content {
    padding: 0 2rem 2rem;
    overflow-y: auto;
}

.gallery-header {
    margin-bottom: 1.5rem;
}

.gallery-info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    border-left: 4px solid #00ff88;
    flex-wrap: wrap;
    gap: 1rem;
}

.path-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.path-label {
    font-weight: 600;
    color: #00ff88;
    font-size: 0.9rem;
}

.path-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #ccc;
    border: 1px solid rgba(0, 255, 136, 0.2);
    max-width: 300px;
    word-break: break-all;
}

.folder-btn {
    background: #00ff88;
    color: #000;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.folder-btn:hover {
    background: #00e67a;
    transform: translateY(-1px);
}

.gallery-info {
    font-size: 0.85rem;
    color: #888;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    min-height: 200px;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #00ff88;
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 0.75rem;
    font-size: 0.8rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    color: #888;
    font-weight: 500;
}

/* Image detail modal styles */
.image-detail-modal {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-detail-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.image-detail-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3rem;
}

.image-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    align-self: flex-end;
    background: #1a1a1a;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.detail-actions-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.detail-btn {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-detail-actions .detail-btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 6px;
    white-space: nowrap;
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-detail-actions .detail-btn:hover {
    background: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 새로운 버튼들의 색상 스타일 */
.detail-btn.magic-camera-btn {
    background: #4a90e2;
    color: #ffffff;
    border: 1px solid #4a90e2;
}

.detail-btn.magic-camera-btn:hover {
    background: #357abd;
    border-color: #357abd;
}

.detail-btn.scale-btn {
    background: #f39c12;
    color: #ffffff;
    border: 1px solid #f39c12;
}

.detail-btn.scale-btn:hover {
    background: #d68910;
    border-color: #d68910;
}

.detail-btn.henna-btn {
    background: #e74c3c;
    color: #ffffff;
    border: 1px solid #e74c3c;
}

.detail-btn.henna-btn:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.image-detail-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.image-detail-main {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    flex: 1;
    min-height: 400px;
    position: relative;
}

.image-info-section {
    flex: 1;
    min-width: 200px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.detail-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.image-info {
    flex: 0 0 auto;
    min-width: 200px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #888;
}

.info-value {
    color: #ccc;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 1200px) {
    .controls-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-workspace {
        flex-direction: column;
        padding: 0 1rem 1rem;
    }
    
    .workspace-panel {
        padding: 1.5rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .control-panel {
        padding: 1rem;
    }
    
    .controls-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }

    .header > div {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-profile {
        justify-content: center;
    }

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

    .image-detail-content {
        padding: 1.5rem;
        gap: 1rem;
    }

    .image-detail-main {
        flex-direction: column !important;
        gap: 1rem;
        align-items: stretch !important;
    }

    .detail-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        display: block !important;
        margin: 0 auto !important;
    }

    .image-info-section {
        width: 100%;
        max-width: none;
    }

    .image-detail-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .detail-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .upload-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }

    .gallery-modal, .image-detail-modal {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .gallery-content, .image-detail-content {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .image-detail-actions {
        margin-top: 0;
        position: sticky;
        bottom: 0;
        background: #1a1a1a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }

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

    .detail-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
        display: block !important;
        margin: 0 auto !important;
    }

    .image-detail-header {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .image-detail-header h3 {
        margin: 0;
        font-size: 1.1rem;
    }

    .detail-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Print Modal Styles */
#printModal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 10001 !important;
    align-items: center !important;
    justify-content: center !important;
}

#printModal.show {
    display: flex !important;
}

.print-modal {
    background: #1a1a1a;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.print-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.print-modal-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.print-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.print-modal-content {
    padding: 2rem;
}

.print-step-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.print-step-section h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.size-controls, .grid-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.size-controls .control-group,
.grid-controls .control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-controls label,
.grid-controls label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.size-controls input,
.grid-controls input {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
}

.size-controls input:focus,
.grid-controls input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.grid-info, .layout-info {
    margin-top: 1rem;
}

.cell-size-display, .info-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.info-value {
    color: #ffffff;
}

.preview-container {
    margin-top: 1rem;
    text-align: center;
}

.grid-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.print-preview-image {
    max-width: 500px;
    max-height: 400px;
    width: auto;
    height: auto;
    display: block;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.grid-cell {
    position: absolute;
    border: 2px solid #4299e1;
    background: rgba(66, 153, 225, 0.1);
    box-sizing: border-box;
}

.preview-note {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
    font-style: italic;
}

.layout-status {
    margin-top: 1rem;
    text-align: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
}

.status-indicator.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-indicator.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.print-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* 모달 내부의 프린트 버튼 */
.print-modal .print-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

/* 메인 작업공간의 프린트 버튼 - action-btn 스타일 유지 */
#printMainBtn.action-btn {
    min-width: auto !important;
    width: auto !important;
}

/* 갤러리 모달의 프린트 버튼 - detail-btn 스타일 유지, min-width 제거 */
.image-detail-actions .detail-btn.print-btn {
    min-width: auto !important;
    flex: 1;
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.print-btn.primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.print-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.print-btn.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

@media (max-width: 768px) {
    .print-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .print-modal-content {
        padding: 1rem;
    }
    
    .size-controls, .grid-controls {
        grid-template-columns: 1fr;
    }
    
    .print-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .print-btn {
        min-width: auto;
        width: 100%;
    }
}

/* =========================
   홈 스크린 필터 스타일
========================= */

.home-tag-list {
    width: 100%;
    margin: 1rem 0;
}

.tag-container {
    position: relative;
    overflow: hidden;
}

.scroll-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 0.5rem 0;
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tag-item {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    user-select: none;
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tag-item-active {
    background: linear-gradient(135deg, #21a98d 0%, #bd3d3c 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* 모바일 필터 스타일 */
@media (max-width: 768px) {
    .tag-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .scroll-container {
        padding: 0.3rem 0;
    }
}

/* =========================
   업로드 컨트롤 새 레이아웃
========================= */

.upload-controls {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.controls-title {
    margin-bottom: 0.8rem;
    text-align: center;
}

.controls-title h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
    opacity: 0.9;
}

.controls-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.style-preview-container {
    flex-shrink: 0;
    width: 120px;
    align-self: stretch;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: block;
    line-height: 0;
    position: relative;
}

.current-style-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: filter 0.3s ease;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.current-style-preview.grayscale {
    filter: grayscale(100%);
}

.controls-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* 버튼 높이 조정 */
.style-select-btn {
    height: 40px !important;
    min-height: 40px !important;
}

.upload-control-select {
    height: 40px !important;
    min-height: 40px !important;
}

/* 모바일에서 세로 정렬 */
@media (max-width: 768px) {
    .controls-content {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .style-preview-container {
        width: 124px;
        height: 124px;
    }
    
    .controls-container {
        width: 100%;
    }
    
    /* 모바일 갤러리 선택 모드 */
    .gallery-content {
        padding: 1rem;
    }
    
    .gallery-info-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        visibility: visible !important;
    }
    
    .gallery-actions {
        display: flex !important;
        gap: 0.5rem !important;
        visibility: visible !important;
    }
    
    .gallery-action-btn, .select-mode-btn {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 10 !important;
    }
    
    .selection-action-bar {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }
    
    .select-all-checkbox {
        font-size: 0.85rem;
    }
    
    .select-all-checkbox .checkmark {
        width: 20px;
        height: 20px;
    }
    
    #selectedCount {
        font-size: 0.8rem;
    }
    
    .action-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    /* 모바일에서 갤러리 아이템 선택 모드 */
    .gallery-item.selection-mode {
        transform: scale(0.98);
    }
    
    .gallery-item.selection-mode::before {
        width: 24px !important;
        height: 24px !important;
        top: 6px !important;
        right: 6px !important;
    }
    
    .gallery-item.selection-mode.selected::after {
        width: 16px !important;
        height: 16px !important;
        top: 10px !important;
        right: 10px !important;
    }
}

/* 프린트 전용 스타일 */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-preview-container,
    .print-preview-container * {
        visibility: visible;
    }
    
    .print-preview-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
    }
    
    .print-cell-image {
        transform: scaleX(-1) !important; /* 프린트 시 좌우 반전 강제 적용 */
        page-break-inside: avoid;
    }
    
    /* 페이지 여백 최소화 */
    @page {
        margin: 10mm;
    }
}

/* 갤러리 선택 모드 */
.gallery-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
}

.gallery-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

.gallery-action-btn, .action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-mode-btn {
    background: rgba(33, 169, 141, 0.2);
    color: #21a98d;
    border: 1px solid rgba(33, 169, 141, 0.3);
}

.select-mode-btn:hover {
    background: rgba(33, 169, 141, 0.3);
}

.select-mode-btn.active {
    background: #21a98d;
    color: white;
}

.selection-action-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}



/* 전체선택 체크박스 스타일 */
.select-all-checkbox {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    color: #ffffff;
    font-size: 0.9rem;
    user-select: none;
}

.select-all-checkbox input[type="checkbox"] {
    display: none;
}

.select-all-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background: transparent;
    position: relative;
    transition: all 0.2s ease;
}

.select-all-checkbox:hover .checkmark {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.select-all-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #21a98d;
    border-color: #21a98d;
}

.select-all-checkbox input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.select-all-icon {
    font-size: 1.1rem;
    margin-left: 0.1rem;
}

#selectedCount {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.85rem;
    margin-left: auto;
}

.download-btn {
    background: rgba(33, 169, 141, 0.2);
    color: #21a98d;
    border: 1px solid rgba(33, 169, 141, 0.3);
}

.download-btn:hover {
    background: rgba(33, 169, 141, 0.3);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}


/* 갤러리 아이템 선택 상태 */
.gallery-item {
    position: relative;
}

.gallery-item.selection-mode {
    cursor: pointer;
}

.gallery-item.selection-mode::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: all 0.2s ease;
}

.gallery-item.selection-mode.selected::before {
    background: #21a98d;
    border-color: #21a98d;
}

.gallery-item.selection-mode.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
}

.gallery-item.selection-mode.selected {
    transform: scale(0.95);
    opacity: 0.8;
}

/* 헤나 스티커 주문 페이지 스타일 */
.henna-order-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.henna-preview-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.henna-preview-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.henna-image-preview {
    text-align: center;
}

.henna-image-preview img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.henna-image-info {
    text-align: left;
    font-size: 0.9rem;
    color: #666;
}

.henna-image-info p {
    margin: 0.5rem 0;
}

.henna-form-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.henna-form-section h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.henna-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-group input:required:invalid {
    border-color: #ff6b6b;
}

.form-section-divider {
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 2px solid #f1f3f4;
}

.form-section-divider h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.copy-info-btn {
    align-self: flex-start;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-info-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.henna-order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.henna-order-summary h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.summary-item.total {
    border-top: 2px solid #dee2e6;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.form-submit {
    margin-top: 2rem;
    text-align: center;
}

.henna-submit-btn {
    background: linear-gradient(135deg, #00d9ff, #00b8e6);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.henna-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

.henna-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.payment-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* 헤나 스티커 주문 페이지 반응형 */
@media (max-width: 768px) {
    .henna-order-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .henna-preview-section {
        position: static;
        order: -1;
    }

    .henna-form-section {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* iOS 줌 방지 */
    }

    .henna-submit-btn {
        width: 100%;
        padding: 1rem;
    }
}