/* 모바일 반응형 CSS */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* 데스크톱 네비게이션 숨기기 */
    .desktop-nav {
        display: none !important;
    }
    
    /* 햄버거 메뉴 보이기 */
    .hamburger {
        display: flex !important;
    }
    
    /* 로고 조정 */
    .nav-wrapper {
        padding: 0.8rem 0;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    /* 모바일 메뉴 개선 */
    .mobile-nav {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mobile-menu a {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
    }
    
    /* 툴 그리드 모바일 최적화 */
    .tool-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .tool-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .tool-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .tool-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* 히어로 섹션 모바일 */
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.8rem;
    }
    
    .hero p {
        font-size: 1rem !important;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    /* 툴 헤더 모바일 */
    .tool-header {
        padding: 2rem 1rem !important;
        text-align: center;
    }
    
    .tool-header h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .tool-header h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem;
    }
    
    .tool-header p {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }
    
    /* 툴 콘텐츠 모바일 */
    .tool-content {
        padding: 1.5rem 1rem !important;
    }
    
    /* 광고 모바일 최적화 */
    .ad-container {
        margin: 20px 0 !important;
        padding: 15px !important;
    }
    
    /* 버튼 모바일 */
    .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 44px; /* 터치 친화적 크기 */
    }
    
    /* 입력 필드 모바일 */
    input[type="text"], 
    input[type="url"], 
    input[type="email"], 
    textarea, 
    select {
        font-size: 16px !important; /* iOS 줌 방지 */
        padding: 0.8rem !important;
        min-height: 44px !important;
    }
    
    textarea {
        min-height: 120px !important;
    }
    
    /* 텍스트 입력 영역 모바일 최적화 */
    .input-area textarea {
        font-size: 16px !important;
        min-height: 150px !important;
    }
    
    /* 통계 영역 모바일 */
    .stats-area {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    /* QR 코드 생성 영역 모바일 */
    .qr-generator-container {
        padding: 0 !important;
    }
    
    .qr-tabs {
        display: flex;
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 80px;
        font-size: 0.9rem !important;
        padding: 0.6rem 0.5rem !important;
    }
    
    /* 파일 업로드 영역 모바일 */
    .upload-area, 
    .bg-upload-area,
    .converter-drop-zone,
    .mosaic-upload-area {
        min-height: 200px !important;
        margin: 1rem 0 !important;
    }
    
    /* 이미지 결과 영역 모바일 */
    .image-result,
    .bg-result {
        max-width: 100% !important;
        margin: 1rem 0 !important;
    }
    
    .result-image {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 모자이크 편집기 모바일 */
    .mosaic-controls {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .control-group {
        width: 100% !important;
    }
    
    .tool-selector {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    /* URL 단축기 모바일 */
    .url-input-section {
        padding: 0 !important;
    }
    
    .input-group {
        margin-bottom: 1rem !important;
    }
    
    .input-group input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 맞춤법 검사 모바일 */
    .spell-check-container {
        flex-direction: column !important;
    }
    
    .spell-input-section,
    .spell-results-section {
        width: 100% !important;
    }
    
    /* 디지털 서명 모바일 */
    .signature-canvas-container {
        max-width: 100% !important;
        overflow-x: auto !important;
    }
    
    #signature-canvas {
        max-width: 100% !important;
        height: 200px !important;
    }
    
    /* 디지털 스탬프 모바일 */
    .stamp-main-controls {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .stamp-input-row {
        width: 100% !important;
    }
    
    .shape-options {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    /* 슬라이더 터치 최적화 */
    input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 8px;
        background: #ddd;
        border-radius: 5px;
        outline: none;
        padding: 0;
        margin: 10px 0;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        background: #007bff;
        cursor: pointer;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 24px;
        height: 24px;
        background: #007bff;
        cursor: pointer;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    input[type="range"]:active::-webkit-slider-thumb {
        background: #0056b3;
        transform: scale(1.2);
    }
    
    input[type="range"]:active::-moz-range-thumb {
        background: #0056b3;
        transform: scale(1.2);
    }
    
    /* 도장 조절 컨트롤 모바일 */
    .text-weight-control,
    .text-size-control,
    .text-spacing-control {
        margin: 15px 0;
    }
    
    .text-weight-control label,
    .text-size-control label,
    .text-spacing-control label {
        font-size: 14px;
        margin-bottom: 8px;
        display: block;
    }
    
    /* Footer 모바일 */
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .footer-section {
        margin-bottom: 2rem !important;
    }
    
    .footer-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .social-links {
        justify-content: center !important;
    }
}

/* 태블릿 크기에 대한 추가 최적화 */
@media (max-width: 1024px) and (min-width: 769px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}