/* 전체 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 50%, #D5DBDB 100%);
    color: #2C3E50;
    line-height: 1.6;
    scroll-behavior: auto; /* 빠른 스크롤을 위해 auto로 변경 */
}

/* 빠른 스크롤을 위한 추가 설정 */
html {
    scroll-behavior: auto;
}

/* 부드러운 스크롤이 필요한 경우에만 적용 */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* 사이트 소개 섹션 스타일 */
.intro-section {
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(139,157,195,0.1) 0%, rgba(139,157,195,0.05) 100%);
    border-bottom: 1px solid rgba(139,157,195,0.2);
}

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

.intro-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #8B9DC3;
    text-align: center;
    margin-bottom: 20px;
}

.intro-description {
    font-size: 1.2rem;
    text-align: center;
    color: #5D6D7E;
    margin-bottom: 40px;
    line-height: 1.8;
}

.usage-guide, .features {
    margin: 40px 0;
}

.usage-guide h3, .features h3 {
    font-size: 1.5rem;
    color: #8B9DC3;
    margin-bottom: 20px;
    text-align: center;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #8B9DC3;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #8B9DC3;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-content p {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0,255,136,0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.feature-item h4 {
    color: #8B9DC3;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-item p {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 도구 설명 섹션 스타일 */
.tool-description {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.tool-description h3 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tool-description p {
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 15px;
}

.tool-description ul {
    color: #cccccc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.tool-description li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.usage-example {
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.usage-example h4 {
    color: #8B9DC3;
    margin-bottom: 10px;
    font-size: 1rem;
}

.usage-example p {
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2rem;
    }
    
    .intro-description {
        font-size: clamp(0.8rem, 4vw, 1rem);
        margin-bottom: 0;
        line-height: 1.4;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
}

/* 상단 네비게이션 바 */
.gnb {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 0 20px;
    height: 72px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    height: 100%;
}

.logo h1 {
    color: #8B9DC3;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.logo {
    height: 100%;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    max-height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-left: auto;
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu li a:hover {
    color: #8B9DC3;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8B9DC3;
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* 드롭다운 메뉴 스타일 */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown .dropdown-toggle {
    cursor: pointer;
}

.nav-menu .dropdown .dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-menu .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-menu .dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-menu .dropdown:hover .dropdown-menu,
.nav-menu .dropdown .dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu .dropdown .dropdown-menu li {
    margin: 0;
}

.nav-menu .dropdown .dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    color: #2C3E50;
    text-decoration: none;
    font-weight: 400;
    transition: background-color 0.2s ease;
    border: none;
}

.nav-menu .dropdown .dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: #8B9DC3;
}

.nav-menu .dropdown .dropdown-menu li a::after {
    display: none;
}

.nav-menu .dropdown .dropdown-menu .dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
    padding: 0;
}

.nav-menu .dropdown .dropdown-menu .loading {
    padding: 10px 16px;
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

/* 메인 컨텐츠 */
.main-content {
    margin-top: 80px;
    padding: 40px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: 40px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: #8B9DC3;
    font-weight: 300;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #cccccc;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 타일 그리드 */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.tile {
    background: linear-gradient(145deg, #F8F9FA, #E8EAED);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #D5DBDB;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #2C3E50;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.1);
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 157, 195, 0.1), transparent);
    transition: left 0.5s ease;
}

.tile:hover::before {
    left: 100%;
}

.tile:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 157, 195, 0.2);
    border-color: #8B9DC3;
    background: linear-gradient(145deg, #E8EAED, #D5DBDB);
}

.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

/* 타일 아이콘의 Twemoji 변환 방지 */
.tile-icon img.emoji {
    width: 2.5rem !important;
    height: 2.5rem !important;
    display: block;
    margin: 0 auto 15px auto;
}

.tile h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2C3E50;
    font-weight: 600;
}

.tile p {
    font-size: 0.9rem;
    color: #5D6D7E;
    line-height: 1.5;
}

/* 서비스 그리드 */
.service-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item, .portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    /* border-radius: 10px; */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.service-item:hover, .portfolio-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #8B9DC3;
    transform: translateY(-5px);
}

.service-item h3, .portfolio-item h3 {
    color: #8B9DC3;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-item p, .portfolio-item p {
    color: #cccccc;
    line-height: 1.6;
}

/* 반응형 디자인 - 모바일에서도 4열 유지 */
@media (max-width: 768px) {
    .tiles-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .tile {
        padding: 20px 10px;
    }
    
    .tile-icon {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .tile-icon img.emoji {
        width: 1.8rem !important;
        height: 1.8rem !important;
        display: block;
        margin: 0 auto 10px auto;
    }
    
    .tile h3 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .tile p {
        font-size: 0.7rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        padding: 10px 0 !important;
    }
    
    .nav-menu {
        gap: 20px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        width: 100%;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .nav-menu li {
        flex-shrink: 0;
    }
    
    .nav-menu li a {
        white-space: nowrap;
    }
    
    .section {
        padding: 20px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .tiles-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }
    
    .tile {
        padding: 25px 15px;
    }
    
    .tile-icon {
        font-size: 2rem;
    }
    
    .tile-icon img.emoji {
        width: 2rem !important;
        height: 2rem !important;
        display: block;
        margin: 0 auto 12px auto;
    }
    
    .tile h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .tile p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .intro-description {
        font-size: clamp(0.7rem, 3.5vw, 0.9rem);
        line-height: 1.3;
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #8B9DC3;
    /* border-radius: 4px; */
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc70;
}



.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
}

/* Google Translate Widget 숨기기 */
.goog-te-banner-frame {
    display: none !important;
}

/* 푸터 정보 영역 스타일 */
.footer-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.footer-info p {
    margin: 0;
}



/* 북마크된 툴 카드 하이라이트 */
.tool-card.bookmarked {
    border-color: rgba(255, 193, 7, 0.5) !important;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%) !important;
}

.tool-card.bookmarked:hover {
    border-color: rgba(255, 193, 7, 0.8) !important;
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* 북마크 아이콘 스타일 */
.bookmark-icon {
    margin-left: 8px;
    font-size: 14px;
    color: #FFC107;
    display: inline-block;
    animation: bookmarkPulse 2s infinite;
}

@keyframes bookmarkPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.footer-language-menu .lang-btn:hover {
    background: rgba(139, 157, 195, 0.2);
    border-color: rgba(139, 157, 195, 0.5);
    transform: scale(1.02);
}


/* 모바일에서 언어 선택기 */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 10px;
    }
    
    .language-toggle-btn {
        min-width: 36px;
        height: 36px;
        font-size: 16px;
        padding: 6px 10px;
    }
    
    .language-toggle-btn img.emoji {
        width: 16px !important;
        height: 16px !important;
    }
    
    .language-menu {
        min-width: 280px;
        right: -10px;
        max-height: 300px;
    }
    
    .language-options {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    
    .lang-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .footer-info {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    
    .footer-info p {
        font-size: 12px;
    }
    
    .footer-language-toggle-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
        padding: 4px 8px;
    }
    
    .footer-language-toggle-btn img.emoji {
        width: 14px !important;
        height: 14px !important;
    }
    
    .footer-language-menu {
        min-width: 280px;
        right: -10px;
        max-height: 300px;
    }
    
    .footer-language-menu .language-options {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    
    .footer-language-menu .lang-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* 상단 링크 영역 */
.top-links {
    position: fixed !important;
    top: 0px !important;
    left: 0 !important;
    right: 0 !important;
    height: 40px !important;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EAED 100%) !important;
    border-bottom: 1px solid rgba(139, 157, 195, 0.2) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 20px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.top-links-left {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.top-links-left::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

.top-links-left a {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.top-links-right {
    display: flex !important;
    align-items: center !important;
}

.top-links a {
    color: #8B9DC3 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(139, 157, 195, 0.1) !important;
}

.top-links a:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #6B7B9D !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(139, 157, 195, 0.15) !important;
    border-color: rgba(139, 157, 195, 0.2) !important;
}

.link-favicon {
    width: 16px !important;
    height: 16px !important;
    border-radius: 2px !important;
}

.link-fallback {
    font-size: 12px !important;
    opacity: 0.8 !important;
}

/* 반응형: 모바일에서 텍스트 숨기고 파비콘만 표시 */
@media (max-width: 768px) {
    .top-links a {
        padding: 6px !important;
        gap: 0 !important;
    }
    
    .top-links a span:not(.link-fallback) {
        display: none !important;
    }
    
    .top-links {
        padding: 0 10px !important;
    }
    
    .top-links-left {
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .top-links a {
        padding: 4px !important;
    }
    
    .link-favicon {
        width: 14px !important;
        height: 14px !important;
    }
    
    .top-links-left {
        gap: 6px !important;
    }
}

/* GNB 기본 위치 (40px 아래로 이동) */
.gnb {
    position: fixed !important;
    top: 40px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
    display: block !important;
    visibility: visible !important;
}

/* 모바일에서 GNB 표시 보장 */
@media (max-width: 768px) {
    .gnb {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        height: auto !important;
        min-height: 100px !important;
        overflow: visible !important;
        padding: 10px 20px !important;
    }
    
    .nav-container {
        display: flex !important;
        visibility: visible !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        gap: 0;
    }
    
    .nav-menu {
        display: flex !important;
        visibility: visible !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none !important;
    }
}

/* tool.php 상단고정 버튼 스타일 (기존 SNS 버튼 스타일은 tools.css에서 관리) */
.sns-share-floating .pin-toggle-btn {
    background: rgba(139, 157, 195, 0.9) !important;
    border: 1px solid rgba(139, 157, 195, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 60px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    z-index: 101 !important;
    position: relative !important;
}

.sns-share-floating .pin-toggle-btn:hover {
    background: rgba(139, 157, 195, 1);
    border-color: rgba(139, 157, 195, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 157, 195, 0.4);
}

.sns-share-floating .pin-toggle-btn.pinned {
    background: rgba(255, 193, 7, 0.9);
    border-color: rgba(255, 193, 7, 0.3);
    color: #333;
}

.sns-share-floating .pin-toggle-btn.pinned:hover {
    background: rgba(255, 193, 7, 1);
    border-color: rgba(255, 193, 7, 0.5);
}
