/* style.css */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-main: #0d0d0d;
    --bg-panel: #1a1a1a;
    --bg-panel-hover: #222222;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #58a6ff;
    --accent-hover: #3b82f6;
    --border: #333333;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

.itp-wrapper {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding: 60px 20px;
    line-height: 1.6;
}

.itp-hero {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
}

.itp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.itp-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.itp-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.itp-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 400;
}

.itp-desc-small {
    font-size: 15px;
    color: #666;
}

.itp-alert {
    margin-top: 30px;
    padding: 15px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.4);
    border-radius: var(--radius-sm);
    color: #ff7b72;
    font-size: 14px;
}

.itp-workspace {
    max-width: 1200px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .itp-workspace {
        grid-template-columns: 1fr;
    }
}

.itp-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.itp-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.itp-step-num {
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.itp-panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.itp-upload-area {
    flex: 1;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.01);
}

.itp-upload-area.dragover {
    border-color: var(--accent);
    background-color: rgba(88, 166, 255, 0.05);
}

.itp-upload-content {
    text-align: center;
}

.itp-upload-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 12px;
}

.itp-btn-upload {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.itp-btn-upload:hover {
    background: rgba(255,255,255,0.05);
}

.itp-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.itp-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.itp-btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.itp-btn-remove:hover {
    background: rgba(0,0,0,0.9);
}

.itp-result-area {
    flex: 1;
    background: #111;
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
    border: 1px solid var(--border);
}

.itp-empty-state {
    color: var(--text-muted);
}

.itp-icon-stars {
    font-size: 24px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.itp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
}

.itp-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.itp-result-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.itp-prompt-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    background: rgba(255,255,255,0.05);
    padding: 6px 12px;
    border-radius: 6px;
    width: fit-content;
}

.itp-prompt-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: #e0e0e0;
    overflow-y: auto;
    margin-bottom: 24px;
    word-break: break-word;
}

.itp-result-actions {
    display: flex;
    justify-content: flex-end;
}

.itp-btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.itp-btn-action:hover {
    background: rgba(255,255,255,0.1);
    border-color: #444;
}

/* Section Common */
.itp-section {
    max-width: 900px;
    margin: 0 auto 80px;
}

.itp-section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Steps */
.itp-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 768px) {
    .itp-steps-grid {
        grid-template-columns: 1fr;
    }
}

.itp-step-card {
    text-align: left;
}

.itp-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.itp-step-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.itp-step-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* FAQ */
.itp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.itp-faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.itp-faq-item summary {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.itp-faq-item summary::-webkit-details-marker {
    display: none;
}

.itp-faq-content {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 15px;
    border-top: 1px solid transparent;
}

.itp-faq-item[open] summary {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
