:root {
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #495057;
    --border-color: #dee2e6;
    --white-color: #ffffff;
    --body-bg: #f4f7f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* 별표 장식 라인 스타일 */
.star-line {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 1em;
    line-height: 1.5;
    text-align: center;
}

/* 모바일에서 별표 크기 조정 */
@media (max-width: 768px) {
    .star-line {
        font-size: 0.7em;
        letter-spacing: -2px;
    }
}

@media (max-width: 480px) {
    .star-line {
        font-size: 0.5em;
        letter-spacing: -3px;
    }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: static;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--primary-hover);
}

.logo i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.logo:hover i {
    transform: rotate(15deg);
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* 숫자 완전히 숨기기 */
.board-table tr::before {
    display: none !important;
}

.board-table td:first-child {
    display: none !important;
}

/* Main CTA Section */
.main-cta {
    background: var(--white-color);
    padding: 80px 0;
}

.main-cta-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.main-cta-info h1 {
    font-size: 2.8em;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-shimmer 3s ease-in-out infinite;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes rainbow-shimmer {
    0% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
    25% {
        background-position: 100% 50%;
        filter: brightness(1.2) saturate(1.3);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.1) saturate(1.2);
    }
    75% {
        background-position: 0% 50%;
        filter: brightness(1.3) saturate(1.4);
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
}

@keyframes golden-shimmer {
    0% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
    25% {
        background-position: 50% 0%;
        filter: brightness(1.3) saturate(1.2);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.1) saturate(1.4);
    }
    75% {
        background-position: 50% 100%;
        filter: brightness(1.2) saturate(1.1);
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }
}

.main-cta-info p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.main-cta-info ul {
    list-style: none;
    margin-bottom: 30px;
}

.main-cta-info ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.05em;
}

.main-cta-info ul li i {
    color: var(--success-color);
    margin-right: 12px;
    font-size: 1.4em;
}

.main-cta-form {
    background: #fdfdff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.main-cta-form h3 {
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    background: linear-gradient(45deg, #e74c3c, #f39c12, #f1c40f, #27ae60, #3498db, #9b59b6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: golden-shimmer 2.5s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

/* Features Section */
.features {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.2em;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}
.section-title p {
    font-size: 1.1em;
    color: var(--secondary-color);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.feature-card {
    text-align: center;
    padding: 30px;
    background: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.feature-card .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

/* Promotion Form */
.promotion-form {
    width: 100%;
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}
input[type="text"], 
input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Poppins', sans-serif;
}
input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}
.btn-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}
.btn, .btn-generate, .btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.btn-generate {
    background-color: var(--dark-color);
    color: var(--white-color);
}

.btn-generate:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-submit {
    background-color: var(--success-color);
    color: var(--white-color);
}

.btn-submit:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
.loading { display: none; text-align: center; padding: 20px; }
.loading.active { display: block; }
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Generated Content Section */
.generated-content-section {
    padding: 60px 0;
    display: none;
    background: var(--white-color);
}
.generated-content-section.active {
    display: block;
}
.generated-content-container {
    max-width: 900px;
    margin: 0 auto;
}
.keyword-suggestions {
    margin-bottom: 40px;
}
.keyword-suggestions h3, .generated-content h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
}
#longtailKeywords {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--light-color);
    color: var(--text-color);
    border-radius: 50px;
    font-size: 0.95em;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    min-height: 40px;
}
.keyword-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}
.domain-tag {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    font-weight: 500;
}
.copy-btn {
    margin-left: 8px;
    background: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.copy-btn:hover {
    background: rgba(255,255,255,0.5);
}
.copy-btn i {
    font-size: 12px;
}
#contentPreview {
    background: #fdfdff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
    margin-top: 30px;
    position: relative;
}
.copy-content-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.copy-content-btn:hover {
    background: var(--primary-hover);
}

/* Board Section */
.board-section {
    padding: 80px 0;
}
.board-container {
    background: var(--white-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.board-header h2 {
    font-size: 1.8em;
    color: var(--dark-color);
    font-weight: 600;
}
.board-stats {
    display: flex;
    gap: 30px;
    color: var(--secondary-color);
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}
.board-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}
.board-table th, .board-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
/* 테이블 헤더 제거 - 헤더 없는 테이블 스타일 */
.board-table tbody tr:hover {
    background-color: #fcfcfc;
}
.promotion-title {
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}
.promotion-title:hover { color: var(--primary-color); }
.promotion-url {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}
.promotion-url:hover { text-decoration: underline; }
.promotion-keywords .keyword-tag {
    font-size: 0.75em;
    padding: 3px 8px;
}
.view-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}
.view-btn:hover { 
    background: var(--primary-hover);
    color: white;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 15px 25px; background: var(--dark-color); color: white; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 1002; display: none; animation: slideIn 0.3s ease; }
.toast.show { display: block; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Footer */
.main-footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0;
    text-align: center;
}
.main-footer p {
    opacity: 0.7;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    min-height: 20px;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    border-radius: 8px;
}
.skeleton-text:last-child {
    margin-bottom: 0;
}
.skeleton-title {
    height: 24px;
    margin-bottom: 15px;
    border-radius: 8px;
}
.skeleton-keyword {
    display: inline-block;
    height: 32px;
    width: 120px;
    margin: 0 8px 8px 0;
    border-radius: 16px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Validation Messages */
.validation-message {
    margin-top: 6px;
    font-size: 0.85em;
    min-height: 1.2em;
}
.validation-error {
    color: var(--danger-color);
}
.validation-success {
    color: var(--success-color);
}
input.invalid {
    border-color: var(--danger-color);
}
input.valid {
    border-color: var(--success-color);
}

/* SEO 시뮬레이션 팝업 모달 */
.seo-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.seo-modal-overlay.active {
    display: flex;
}

.seo-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.seo-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seo-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.seo-modal-header i.fa-cog {
    margin-right: 10px;
}

.seo-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.seo-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.seo-modal-body {
    padding: 25px;
}

.seo-status {
    margin-bottom: 20px;
    text-align: center;
}

.seo-status-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 15px;
}

.seo-progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.seo-progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.seo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.seo-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
}

.seo-code-display {
    margin-top: 20px;
}

.seo-terminal {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #404040;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
    margin-right: 15px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27ca3f; }

.terminal-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.terminal-body {
    padding: 15px;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.terminal-content {
    color: #e6edf3;
    font-size: 12px;
    line-height: 1.5;
}

.terminal-line {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.terminal-prompt {
    color: #27ca3f;
    margin-right: 8px;
}

.terminal-cursor {
    color: #fff;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-command {
    color: #79c0ff;
}

.terminal-output {
    color: #a5d6ff;
    margin-left: 0;
}

.terminal-success {
    color: #27ca3f;
}

.terminal-keyword { color: #ff7b72; }
.terminal-function { color: #d2a8ff; }
.terminal-string { color: #a5d6ff; }
.terminal-comment { color: #8b949e; }
.terminal-number { color: #79c0ff; }

/* 모바일 반응형 */
@media (max-width: 768px) {
    .seo-modal {
        max-width: 95%;
        max-height: 85vh;
        margin: 10px;
    }

    .seo-modal-header {
        padding: 15px 20px;
    }

    .seo-modal-header h3 {
        font-size: 16px;
    }

    .seo-modal-body {
        padding: 20px;
    }

    .seo-status-text {
        font-size: 14px;
    }

    .terminal-body {
        min-height: 150px;
        max-height: 200px;
    }

    .terminal-content {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .seo-modal {
        max-width: 100%;
        max-height: 90vh;
        margin: 5px;
        border-radius: 12px;
    }

    .seo-modal-header {
        border-radius: 12px 12px 0 0;
        padding: 12px 15px;
    }

    .seo-modal-header h3 {
        font-size: 14px;
    }

    .seo-modal-body {
        padding: 15px;
    }

    .terminal-body {
        min-height: 120px;
        max-height: 180px;
        padding: 10px;
    }
}