/***********************
 * 공통 스타일
 ***********************/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    max-width: 900px;
    width: 100%;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

h2 {
    color: #444;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/***********************
 * 내 명함 찾기 섹션
 ***********************/
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    color: white;
}

.search-section h2 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 0;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-box button {
    padding: 15px 30px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-results {
    margin-top: 20px;
    display: none;
}

.search-results.show {
    display: block;
}

.result-card {
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.result-info {
    margin: 8px 0;
    color: #666;
}

.result-info strong {
    color: #333;
}

.goto-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.goto-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.no-result {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/***********************
 * 사용 방법 스타일
 ***********************/
.steps {
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    margin: 20px 0;
    padding-left: 50px;
    position: relative;
    line-height: 1.8;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    background: #667eea;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.highlight {
    background: #fff3cd;
    padding: 20px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
    border-radius: 5px;
}

.specs {
    background: #e7f3ff;
    padding: 15px;
    border-left: 4px solid #2196F3;
    margin: 15px 0;
    border-radius: 5px;
    font-size: 0.95rem;
}

.specs strong {
    color: #1976D2;
}

/***********************
 * 버튼 스타일
 ***********************/
.btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 30px;
    margin-right: 10px;
    transition: all 0.3s;
}

.btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background: #28a745;
}

.btn.secondary:hover {
    background: #218838;
}

/***********************
 * 기타
 ***********************/
code {
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-size: 0.9rem;
    /* ✅ 추가 */
    word-break: break-all;
    /* ✅ 추가 */
}

.loading {
    text-align: center;
    color: white;
    padding: 20px;
    display: none;
}

.loading.show {
    display: block;
}

/* ✅ URL 예시 섹션 스타일 추가 */
.url-example {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    overflow-x: auto;
    /* 가로 스크롤 가능 */
}

.url-example code {
    display: block;
    white-space: nowrap;
    /* 줄바꿈 방지 */
    overflow-x: auto;
    /* 가로 스크롤 */
    padding: 10px;
}

/***********************
 * 반응형
 ***********************/
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }

    .steps li {
        padding-left: 45px;
        font-size: 0.95rem;
    }

    .steps li::before {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    /* ✅ code 태그 모바일 최적화 */
    code {
        font-size: 0.8rem;
        display: inline-block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* ✅ URL 박스 모바일 최적화 */
    .url-example {
        padding: 10px;
    }

    .url-example code {
        font-size: 0.75rem;
    }

    /* ✅ 버튼 모바일 최적화 */
    .btn {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* ✅ 매우 작은 화면 (320px 이하) */
@media (max-width: 375px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    code {
        font-size: 0.7rem;
    }

    .highlight,
    .specs {
        font-size: 0.85rem;
        padding: 15px;
    }
}