/* ==========================================================================
   Popcon Stylesheet
   라이트/다크 듀얼 테마 — 블랙 & 화이트 미니멀 디자인
   ========================================================================== */

/* 다크 (기본) */
:root, [data-theme="dark"] {
    --bg: #0A0A0A;
    --bg-elevated: #141414;
    --bg-card: #1A1A1A;
    --bg-input: #0F0F0F;
    --bg-hover: #222222;

    --text: #FFFFFF;
    --text-secondary: #A8A8A8;
    --text-tertiary: #6B6B6B;
    --text-disabled: #3D3D3D;

    --border: #2A2A2A;
    --border-strong: #3D3D3D;
    --border-active: #FFFFFF;

    --accent: #FFFFFF;
    --accent-hover: #E5E5E5;
    --accent-text: #0A0A0A;

    --success: #FFFFFF;
    --error: #FF6B6B;
    --warning: #FFD93D;

    --toggle-bg-off: #2A2A2A;
    --toggle-bg-on: #7B7B7B;
    --toggle-thumb-off: #6B6B6B;
    --toggle-thumb-on: #FFFFFF;

    --header-bg: rgba(10, 10, 10, 0.85);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 100px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    color-scheme: dark;
}

/* 라이트 */
[data-theme="light"] {
    --bg: #FFFFFF;
    --bg-elevated: #F8F8F8;
    --bg-card: #FFFFFF;
    --bg-input: #F4F4F4;
    --bg-hover: #EFEFEF;

    --text: #0A0A0A;
    --text-secondary: #4A4A4A;
    --text-tertiary: #888888;
    --text-disabled: #C8C8C8;

    --border: #E5E5E5;
    --border-strong: #D0D0D0;
    --border-active: #0A0A0A;

    --accent: #0A0A0A;
    --accent-hover: #2A2A2A;
    --accent-text: #FFFFFF;

    --success: #0A0A0A;
    --error: #DC2626;
    --warning: #B45309;

    --toggle-bg-off: #D0D0D0;
    --toggle-bg-on: #7B7B7B;
    --toggle-thumb-off: #FFFFFF;
    --toggle-thumb-on: #FFFFFF;

    --header-bg: rgba(255, 255, 255, 0.85);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);

    color-scheme: light;
}

/* === Material Symbols === */
.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
    flex-shrink: 0;
}

/* === 리셋 === */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Pretendard Variable', Pretendard, -apple-system,
                 BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo',
                 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 모든 인터랙티브 요소도 Pretendard 상속 */
button, input, textarea, select {
    font-family: inherit;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.0625rem; font-weight: 600; }

p { margin: 0 0 1em; }

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover { opacity: 0.7; }

button { font: inherit; cursor: pointer; }

code {
    font-family: inherit;
    font-size: 0.825em;
    color: var(--text-secondary);
}

::selection {
    background: var(--text);
    color: var(--bg);
}

/* === 레이아웃 === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow { max-width: 720px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* === 헤더 === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo:hover { opacity: 1; }

.logo-icon {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    display: none;
}

/* 다크 모드(기본): 흰색/윤곽선 로고 */
.logo-icon-dark { display: block; }
[data-theme="light"] .logo-icon-dark { display: none; }
[data-theme="light"] .logo-icon-light { display: block; }

.footer-logo {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
    display: none;
}

.footer-logo-dark { display: block; }
[data-theme="light"] .footer-logo-dark { display: none; }
[data-theme="light"] .footer-logo-light { display: block; }

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.nav a:hover { color: var(--text); opacity: 1; }
.nav .material-symbols-rounded { font-size: 1.25rem; }

/* === 테마 토글 (헤더) === */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    width: 64px;
    height: 32px;
    position: relative;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    transition: border-color var(--transition);
}

.theme-toggle:hover { border-color: var(--border-strong); }

.theme-toggle::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text);
    top: 3px;
    left: 3px;
    transition: transform var(--transition), background var(--transition);
}

[data-theme="light"] .theme-toggle::before {
    transform: translateX(32px);
    background: var(--accent);
}

.theme-toggle .theme-icon {
    position: absolute;
    font-size: 1rem;
    transition: opacity var(--transition);
    color: var(--text-secondary);
    pointer-events: none;
}

.theme-toggle .theme-icon-sun { left: 8px; }
.theme-toggle .theme-icon-moon { right: 8px; }

[data-theme="light"] .theme-toggle .theme-icon-sun { opacity: 0; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { opacity: 0; }
:root:not([data-theme="light"]) .theme-toggle .theme-icon-moon { opacity: 0; }

/* === 언어 드롭다운 === */
.lang-picker {
    position: relative;
}

.lang-button {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    height: 32px;
    padding: 0 0.625rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.lang-button:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.lang-button .material-symbols-rounded {
    font-size: 1.1rem;
}

.lang-current {
    letter-spacing: 0.5px;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.lang-menu.show { display: block; }

.lang-menu li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    font-size: 0.875rem;
    transition: background var(--transition);
}

.lang-menu li:hover,
.lang-menu li:focus-visible {
    background: var(--bg-hover);
    outline: none;
}

.lang-menu li.active {
    background: var(--bg-card);
    font-weight: 600;
}

.lang-menu .lang-code {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    min-width: 24px;
    letter-spacing: 0.5px;
}

.lang-menu .lang-native {
    flex: 1;
}

/* RTL 언어용 보정 */
html[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}

/* === 플랫폼 카드 — 컴포넌트 헤더 + 서브 토글 === */
.platform-card-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

.component-toggles {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.25rem;
}

.component-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-top: 1px solid var(--border);
    gap: 0.75rem;
}

.component-toggle:first-child { border-top: none; }

.component-info {
    flex: 1;
    min-width: 0;
}

.component-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.component-meta {
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: inherit;
    margin-top: 0.125rem;
}

/* 카드 헤더의 마스터 토글 (전체 선택/해제) */
.platform-master {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.5rem;
}

/* === 메인 === */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0 4rem;
}

.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    justify-content: center;
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* === 드롭존 === */
.upload-section { margin-bottom: 2rem; }

.dropzone {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--text);
    background: var(--bg-card);
}

.dropzone.error {
    border-color: var(--error);
    background: rgba(255, 107, 107, 0.04);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-variation-settings: 'FILL' 0, 'wght' 300;
}

.dropzone-icon.error-icon { color: var(--error); }

.dropzone-title {
    font-size: 1.0625rem;
    font-weight: 500;
    margin: 0;
    color: var(--text);
}

.dropzone-hint {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
    font-family: inherit;
}

.dropzone-title { font-family: inherit; }

/* 미리보기 */
.preview-wrapper {
    width: 96px;
    height: 96px;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    background:
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
        linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-color: #1a1a1a;
    border: 1px solid var(--border);
}

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

.preview-info { margin-bottom: 0.75rem; }

.preview-name {
    font-weight: 500;
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.preview-meta {
    font-size: 0.825rem;
    color: var(--text-tertiary);
    margin: 0;
    font-family: inherit;
}

/* === 플랫폼 카드 === */
.platforms-section {
    margin: 4rem 0 3rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.section-header h2 .material-symbols-rounded {
    font-size: 1.5rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-link {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.825rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.btn-link:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color var(--transition);
}

.platform-card:hover { border-color: var(--border-strong); }

.platform-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.platform-card-header h3 {
    margin: 0;
    flex: 1;
}

/* 카드 하단 옵션 영역 (색상 피커 등) */
.card-option {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-option label {
    font-size: 0.875rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.card-option .option-hint {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: normal;
}

/* === 토글 스위치 === */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 0 0.5rem;
    border-top: 1px solid var(--border);
}

.toggle-row:first-of-type { border-top: none; padding-top: 0; }

.toggle-row.standalone {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.toggle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.toggle-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.125rem;
    font-family: inherit;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0; height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--toggle-bg-off);
    border-radius: var(--radius-pill);
    transition: background var(--transition);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; top: 3px;
    background: var(--toggle-thumb-off);
    border-radius: 50%;
    transition: all var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--toggle-bg-on);
}

.toggle input:checked + .toggle-slider::before {
    background: var(--toggle-thumb-on);
    transform: translateX(18px);
}

.toggle input:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* === 사이즈 정보 (좌측 정렬, 라벨 + 한 줄 아래 코드) === */
.size-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    text-align: left;
}

.size-info:last-of-type { margin-bottom: 0.75rem; }

.size-label {
    color: var(--text-tertiary);
    font-weight: 500;
}

.size-info code {
    display: block;
    width: 100%;
    color: var(--text-secondary);
    background: transparent;
    text-align: left;
    word-break: break-all;
    font-size: 0.75rem;
}

/* === 옵션 블록 === */
.options-block {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.options-block summary {
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.options-block summary::-webkit-details-marker { display: none; }

.options-block summary::after {
    content: 'expand_more';
    font-family: 'Material Symbols Rounded';
    font-size: 1.25rem;
    margin-left: auto;
    transition: transform var(--transition);
}

.options-block[open] summary::after {
    transform: rotate(180deg);
}

.options-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
}

.option-row label {
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: normal;
}

.option-row input[type="text"]:not(.color-input) {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 0.625rem 0.875rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.option-row input[type="text"]:not(.color-input):focus {
    outline: none;
    border-color: var(--text);
}

/* === 고급 컬러 피커 === */
.color-picker {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 4px;
    transition: border-color var(--transition);
    position: relative;
    width: 180px;
}

.color-picker:focus-within {
    border-color: var(--text);
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
    background-image:
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
        linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    transition: border-color var(--transition);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.color-swatch::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-color: inherit;
}

.color-swatch:hover {
    border-color: var(--text);
}

.color-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0;
    width: 0;
    min-width: 0;
}

.color-input:focus { outline: none; }

.color-native {
    position: absolute;
    opacity: 0;
    width: 28px;
    height: 28px;
    left: 4px;
    top: 4px;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* 컬러 팔레트 */
.color-palette {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.625rem;
    z-index: 50;
    box-shadow: var(--shadow-lg);
    display: none;
}

.color-palette.show { display: block; }

.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.color-preset {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--transition);
    padding: 0;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: var(--text);
}

/* === 버튼 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn .material-symbols-rounded {
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text);
    text-decoration: none;
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* === 액션 바 === */
.action-bar {
    margin: 2rem 0 1rem;
    text-align: center;
}

.action-info {
    margin-top: 0.75rem;
    font-size: 0.825rem;
    color: var(--text-tertiary);
    font-family: inherit;
}

.privacy-note {
    text-align: center;
    font-size: 0.825rem;
    color: var(--text-tertiary);
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    justify-content: center;
}

.privacy-note .material-symbols-rounded { font-size: 1rem; }

/* === 처리 중 === */
.processing-section {
    text-align: center;
    padding: 4rem 0;
}

.processing-section h2 {
    margin-bottom: 2rem;
    justify-content: center;
}

.spinning {
    display: inline-block;
    animation: spin 2s linear infinite;
    font-variation-settings: 'FILL' 1;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.progress-bar {
    max-width: 480px;
    margin: 1.5rem auto 1rem;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--text);
    border-radius: var(--radius-pill);
    transition: width 300ms ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === 결과 === */
.result-section {
    text-align: center;
    padding: 3rem 0;
}

.result-section h2 {
    color: var(--text);
    margin-bottom: 2rem;
    justify-content: center;
}

.result-section h2 .material-symbols-rounded {
    font-variation-settings: 'FILL' 1;
}

.result-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
}

.result-icon {
    font-size: 3rem;
    color: var(--text);
    font-variation-settings: 'FILL' 1, 'wght' 300;
    display: block;
    margin: 0 auto 1rem;
}

.result-info { margin-bottom: 1.5rem; }

.result-filename {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.result-meta {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin: 0;
    font-family: inherit;
}

.result-warning {
    margin-top: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.result-warning .material-symbols-rounded { font-size: 1rem; }

.result-actions { margin-top: 2rem; }

/* HTML 스니펫 */
.snippet-block {
    max-width: 720px;
    margin: 2rem auto 0;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.snippet-block summary {
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.snippet-block summary::-webkit-details-marker { display: none; }

.snippet-code {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-secondary);
}

/* === 콘텐츠 페이지 === */
.content-section { padding: 2rem 0 4rem; }
.content-section h1 { margin-bottom: 0.5rem; }
.content-section h2 { margin-top: 2rem; }
.content-section .meta {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}
.content-section ul { padding-left: 1.5rem; }
.content-section li { margin-bottom: 0.5rem; }

.large-icon {
    font-size: 5rem !important;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* === 푸터 === */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-brand .material-symbols-rounded {
    font-variation-settings: 'FILL' 1;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a { color: var(--text-tertiary); }

.footer-copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
}

/* === 쿠키 동의 배너 === */
.cookie-consent {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 500;
    font-size: 0.875rem;
}

.cookie-consent.hidden { display: none; }

.cookie-consent-text {
    flex: 1;
    color: var(--text-secondary);
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-consent-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .cookie-consent {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent-actions {
        justify-content: flex-end;
    }
}

/* === 광고 슬롯 === */
.ad-slot {
    margin: 1.5rem auto;
    text-align: center;
    min-height: 90px;
    max-width: 728px;
}

.ad-slot::before {
    content: "Advertisement";
    display: block;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ad-slot:empty,
.ad-slot:not(:has(ins)) {
    display: none;
}

/* === 토스트 === */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: var(--text);
    color: var(--bg);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    transition: transform 300ms ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* === 반응형 === */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    .nav { gap: 0.75rem; }
    .nav a { font-size: 0.85rem; }
    .hero { padding: 2rem 0 1rem; }
    .dropzone { padding: 2.5rem 1rem; }
    .platforms-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; }
}

/* === 접근성 === */
*:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === 스크롤바 === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
