/* 커스텀 스타일 */

:root {
    --primary-color: #8a7bff; /* 연한 보라색 */
    --primary-light: #e8e5ff; /* 더 연한 보라색 */
    --primary-dark: #6c5ce7; /* 진한 보라색 */
    --accent-color: #a29bfe; /* 보조 보라색 */
    --text-primary: #444; /* 주요 텍스트 색상 */
    --text-secondary: #666; /* 보조 텍스트 색상 */
    --bg-color: #f8f7ff; /* 배경색 */
    --box-shadow: 0 3px 10px rgba(138, 123, 255, 0.15); /* 그림자 */
}

/* 부드러운 스크롤 효과 */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 공통 트랜지션 효과 */
.transition-all {
    transition: all 0.3s ease;
}

/* 카드 호버 효과 */
.bg-white.rounded-lg {
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.bg-white.rounded-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(138, 123, 255, 0.2);
}

/* 카드 링크 스타일 */
.card-link {
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.card-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.card-link a, 
.card-link button {
    position: relative;
    z-index: 3;
}

/* 링크 호버 효과 */
a.text-blue-600 {
    color: var(--primary-color);
    transition: all 0.2s ease;
}

a.text-blue-600:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 네비게이션 바 스타일 */
nav.bg-white {
    background-color: white;
    box-shadow: var(--box-shadow);
}

nav a.text-blue-600 {
    color: var(--primary-color);
}

nav a.text-gray-700 {
    color: var(--text-primary);
}

nav a.text-gray-700:hover {
    color: var(--primary-color);
}

/* 네비게이션 드롭다운 효과 */
.group:hover .group-hover\:block {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

/* 헤더 그래디언트 효과 */
header.bg-gradient-to-r {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f8f7ff 100%);
    background-size: 200% 200%;
    animation: gradientMove 10s ease infinite;
}

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

/* 카드 아이콘 효과 */
.bg-blue-100, .bg-purple-100, .bg-green-100, .bg-yellow-100 {
    transition: all 0.3s ease;
    background-color: var(--primary-light);
    border-radius: 8px;
}

.bg-white.rounded-lg:hover .bg-blue-100,
.bg-white.rounded-lg:hover .bg-purple-100,
.bg-white.rounded-lg:hover .bg-green-100,
.bg-white.rounded-lg:hover .bg-yellow-100 {
    transform: scale(1.1);
}

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

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

/* 모바일 반응형 조정 */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .flex.items-center.space-x-4 {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.block {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
    
    .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-tool {
        min-height: 44px;
    }
    
    /* 모바일에서 메뉴 가로 스크롤 */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .overflow-x-auto::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
}

/* 새 기능 배지 효과 */
.bg-blue-100.text-blue-800 {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(138, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(138, 123, 255, 0);
    }
}

/* 모든 이미지에 대한 스타일 */
img {
    max-width: 100%;
    height: auto;
}

/* 카드 그리드 레이아웃 보정 */
.grid {
    grid-gap: 1.5rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lg\:w-1\/2 {
        width: 50%;
    }
    
    .flex.flex-col.lg\:flex-row {
        align-items: stretch;
    }
}

/* 여권사진 자르기 카드 스타일 */
.lg\:w-1\/2.bg-white {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.lg\:w-1\/2.bg-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(138, 123, 255, 0.2);
}

/* 여권사진 자르기 카드 클릭 효과 */
.lg\:w-1\/2.bg-white.card-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.lg\:w-1\/2.bg-white.card-link a, 
.lg\:w-1\/2.bg-white.card-link button {
    position: relative;
    z-index: 3;
}

/* 여권사진 자르기 카드 클릭 시 효과 */
.lg\:w-1\/2.bg-white:active {
    transform: translateY(-2px);
    transition: all 0.1s ease;
}

/* 체크리스트 아이템 효과 */
.fas.fa-check {
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.lg\:w-1\/2.bg-white:hover .fas.fa-check {
    transform: scale(1.2);
}

/* 버튼 호버 효과 */
.inline-block.px-6.py-3.bg-blue-600 {
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.inline-block.px-6.py-3.bg-blue-600:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(138, 123, 255, 0.3);
}

/* 2x2 그리드 스타일 */
.grid.grid-cols-1.md\:grid-cols-2.gap-6.h-full {
    min-height: 100%;
}

/* 이미지 업로드 드롭존 커스텀 스타일 */
#dropzone {
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--primary-light);
    background-color: white;
}

#dropzone:hover {
    background-color: #f9f8ff;
    border-color: var(--primary-color);
}

#dropzone.drag-over {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

/* 버튼 호버 효과 */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(138, 123, 255, 0.2);
}

/* 이미지 미리보기 */
.image-preview {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 푸터 스타일 */
footer.bg-white {
    background-color: white;
    border-top: 1px solid #eee;
    margin-top: auto;
}

footer .text-gray-500 {
    color: var(--text-secondary);
}

/* 반응형 레이아웃 조정 */
@media (max-width: 1023px) {
    .flex.flex-col.lg\:flex-row.gap-6 > div {
        margin-bottom: 1.5rem;
    }
    
    .lg\:w-1\/2 {
        width: 100%;
    }
}

/* 전역 스타일 */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 캔버스 관련 스타일 */
#canvas-container {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
}

/* 버튼 호버 애니메이션 */
.btn-tool {
    transition: all 0.2s ease;
}

.btn-tool:active {
    transform: scale(0.97);
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1a1a1a;
        color: #f5f5f5;
    }
}

/* 접근성 개선 */
:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

input[type="file"] {
    color: transparent;
}

/* 로딩 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* 버튼 애니메이션 */
.btn-pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(66, 153, 225, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 153, 225, 0); }
}

/* 광고 컨테이너 스타일 */
.ad-container {
    min-height: 90px;
    background-color: rgba(243, 244, 246, 0.4);
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ad-sidebar {
    min-height: 250px;
    background-color: rgba(243, 244, 246, 0.4);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 모바일에서 광고 크기 조정 */
@media (max-width: 768px) {
    .ad-container {
        min-height: 100px;
    }
    .ad-sidebar {
        min-height: 280px;
    }
}

/* 광고 로딩 효과 */
.adsbygoogle {
    transition: opacity 0.3s ease;
}

/* 광고 로딩 전 스타일 */
.adsbygoogle:not([data-adsbygoogle-status="done"]) {
    opacity: 0.6;
}

/* 광고 블록에 호버 효과 */
.ad-container:hover, .ad-sidebar:hover {
    background-color: rgba(243, 244, 246, 0.7);
} 