* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* AI 기술 배지 */
.tech-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.tech-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tech-badge.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.tech-badge.chatgpt {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
}

.tech-badge.claude {
    background: linear-gradient(135deg, #cc785c, #a85e42);
}

/* 특징 섹션 */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .features-section {
        grid-template-columns: 1fr;
    }

    .tech-badges {
        gap: 10px;
    }
}

/* 언어 선택기 */
.language-selector {
    position: absolute;
    top: 0;
    right: 0;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.lang-btn.active .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 140px;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.lang-option:hover {
    background: #f3f4f6;
}

header {
    position: relative;
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group input::placeholder {
    color: #aaa;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
}

.result-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.result-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.result-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.result-item .reason-label {
    color: #667eea;
    font-weight: 600;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    color: #dc2626;
    text-align: center;
}

.ai-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.ai-badge.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.ai-badge.chatgpt {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
    color: white;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 결과 그리드 레이아웃 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.result-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
}

.ai-header {
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
}

.ai-header.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.ai-header.chatgpt {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
    color: white;
}

.ai-header.claude {
    background: linear-gradient(135deg, #cc785c, #a85e42);
    color: white;
}

.result-content {
    min-height: 200px;
}

/* 로딩 인디케이터 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    margin-bottom: 15px;
}

.loading-indicator p {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .form-section,
    .result-section {
        padding: 20px;
    }
}

/* 사용 횟수 및 API 설정 섹션 */
.usage-info-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.usage-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.usage-badge.exhausted {
    color: #ffd700;
}

.usage-icon {
    font-size: 1.2rem;
}

.api-settings-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.api-settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* API 키 설정 패널 */
.api-settings-panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-settings-header {
    margin-bottom: 20px;
}

.api-settings-header h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.api-settings-desc {
    color: #666;
    font-size: 0.9rem;
}

.api-settings-note {
    color: #10b981;
    font-size: 0.85rem;
    margin-top: 6px;
    padding: 8px 12px;
    background: #ecfdf5;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.api-key-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.api-key-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.api-key-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.api-key-group input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.api-key-group input:focus {
    outline: none;
    border-color: #667eea;
}

.api-key-group input.has-key {
    border-color: #10b981;
    background: #f0fdf4;
}

.api-link {
    font-size: 0.8rem;
    color: #667eea;
    text-decoration: none;
}

.api-link:hover {
    text-decoration: underline;
}

.api-key-actions {
    display: flex;
    gap: 10px;
}

.save-keys-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.save-keys-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.clear-keys-btn {
    padding: 12px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-keys-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* 사용 불가 메시지 */
.usage-exhausted-message {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.usage-exhausted-message h4 {
    color: #b45309;
    margin-bottom: 8px;
}

.usage-exhausted-message p {
    color: #92400e;
    font-size: 0.9rem;
}

/* API 키 없음 메시지 */
.no-key-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

.no-key-message p:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.no-key-message p:last-child {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .usage-info-section {
        flex-direction: column;
        gap: 10px;
    }

    .api-key-inputs {
        grid-template-columns: 1fr;
    }
}

/* Footer 스타일 */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.visitor-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.visitor-icon {
    font-size: 1.3rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: white;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* SEO 소개 섹션 */
.seo-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 20px;
    margin-top: 40px;
}

.seo-container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.seo-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.seo-content strong {
    color: #667eea;
}

/* FAQ 섹션 */
.faq-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 60px 20px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: #667eea;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 25px 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
}

/* ========== 멀티 페이지 스타일 ========== */

/* 페이지 컨테이너 */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

/* 페이지 헤더/네비게이션 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.page-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-logo {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

/* 페이지 콘텐츠 */
.page-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

/* About 페이지 */
.about-hero {
    text-align: center;
    margin-bottom: 60px;
}

.about-hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.about-section {
    margin-bottom: 50px;
}

.about-section h2 {
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    display: inline-block;
}

.about-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.about-feature {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.feature-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.about-feature h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.about-feature p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* AI 카드 */
.ai-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.ai-card {
    padding: 25px;
    border-radius: 12px;
    color: white;
}

.ai-card.gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.ai-card.chatgpt {
    background: linear-gradient(135deg, #10a37f, #1a7f64);
}

.ai-card.claude {
    background: linear-gradient(135deg, #cc785c, #a85e42);
}

.ai-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.ai-card p {
    font-size: 0.9rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* CTA 섹션 */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px;
    border-radius: 16px;
    color: white;
}

.cta-section h2 {
    color: white;
    border: none;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    margin-top: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Legal 페이지 (개인정보, 이용약관) */
.legal-content h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.last-updated {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-section {
    margin-bottom: 35px;
}

.legal-section h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
}

.legal-section p,
.legal-section ul {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

.legal-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-section .notice {
    background: #fff3cd;
    padding: 15px;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin-top: 15px;
}

/* 페이지 푸터 */
.page-footer {
    background: #2d2d2d;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.page-footer .copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
        font-size: 0.85rem;
    }

    .feature-grid,
    .ai-cards {
        grid-template-columns: 1fr;
    }

    .about-hero h1 {
        font-size: 1.8rem;
    }

    .footer-links {
        gap: 15px;
    }
}
