/* ============================================
   성격 색상 테스트 CSS
   ============================================ */

:root {
    --dark-bg: #0f0f23;
    --darker-bg: #1a1a3f;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #ff6b6b;
    --gradient: linear-gradient(135deg, #ff6b6b, #ffd93d, #00b894, #4ecdc4, #a29bfe);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode */
[data-theme="light"] {
    --dark-bg: #f5f5fa;
    --darker-bg: #efefff;
    --card-bg: rgba(0, 0, 0, 0.08);
    --card-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a70;
}

[data-theme="light"] .option {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .option:hover {
    background: rgba(255,107,107,0.08);
    border-color: rgba(255,107,107,0.25);
}
[data-theme="light"] .option.selected {
    background: rgba(255,107,107,0.1);
    border-color: var(--accent);
}
[data-theme="light"] .type-item {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .lang-toggle,
[data-theme="light"] .theme-toggle {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: var(--text-primary);
}
[data-theme="light"] .lang-toggle:hover,
[data-theme="light"] .theme-toggle:hover {
    background: rgba(0,0,0,0.08);
}
[data-theme="light"] .lang-menu {
    background: rgba(245,245,250,0.98);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .lang-option:hover {
    background: rgba(255,107,107,0.08);
}
[data-theme="light"] .rec-card {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .rec-card:hover {
    background: rgba(255,107,107,0.06);
    border-color: rgba(255,107,107,0.2);
}
[data-theme="light"] .ad-banner {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .app-loader {
    background: #f5f5fa;
}
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f0f0f5;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Touch Optimization */
button, a, input, [role="button"], [role="link"] {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

input[type="text"], textarea {
    -webkit-user-select: text;
    user-select: text;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-touch-callout: none;
}

/* ============================================
   로더 스타일
   ============================================ */

.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.app-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-emoji {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: bounce 1.5s infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ============================================
   애니메이션
   ============================================ */

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 107, 107, 0.6); }
}

@keyframes colorShift {
    0% { background: linear-gradient(135deg, #ff6b6b, #ff8787); }
    25% { background: linear-gradient(135deg, #ffd93d, #ffed4e); }
    50% { background: linear-gradient(135deg, #00b894, #1dd1a1); }
    75% { background: linear-gradient(135deg, #a29bfe, #9b59b6); }
    100% { background: linear-gradient(135deg, #ff6b6b, #ff8787); }
}

/* ============================================
   컨테이너 & 레이아웃
   ============================================ */

.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
}

.screen {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* ============================================
   언어 선택기
   ============================================ */

.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.lang-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    min-width: 140px;
    z-index: 200;
}

.lang-menu.hidden {
    display: none;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option.active {
    background: rgba(255, 107, 107, 0.2);
    border-left-color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 76px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* ============================================
   광고 영역
   ============================================ */

.ad-container {
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.ad-top {
    margin-top: 0;
}

/* ============================================
   인트로 화면
   ============================================ */

.intro-content {
    text-align: center;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

.color-circle-animation {
    margin: 2rem 0 1.5rem;
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-emoji {
    font-size: 5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.intro-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-subtitle {
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.intro-description {
    margin: 2rem 0;
    line-height: 1.6;
}

.intro-description p {
    margin: 0.8rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.color-types-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin: 2rem 0;
    max-width: 100%;
}

.color-badge {
    padding: 0.8rem 0.4rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.color-badge.white {
    color: #333;
    text-shadow: none;
}

.time-estimate {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   버튼 스타일
   ============================================ */

.btn {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4);
}

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

.btn-secondary {
    background: var(--card-bg);
    border: 1.5px solid var(--accent);
    color: var(--accent);
    margin-top: 1.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff8787;
}

.btn-premium {
    background: linear-gradient(135deg, #ffd93d, #ffed4e);
    color: #1a1a3f;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 217, 61, 0.3);
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--accent);
}

/* ============================================
   퀴즈 화면
   ============================================ */

.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
    animation: slideInLeft 0.4s ease-out;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

.quiz-content {
    animation: fadeIn 0.4s ease-out 0.2s backwards;
}

.question-container {
    margin: 2rem 0;
}

.question-text {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    min-height: 56px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

.option:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--accent);
    transform: translateX(8px);
}

.option:active {
    transform: translateX(4px);
}

/* ============================================
   분석 중 화면
   ============================================ */

.analyzing-content {
    text-align: center;
    padding: 3rem 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

.color-scan {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
}

.color-scan-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    top: 25px;
    left: 25px;
    animation: pulse 2s infinite;
}

.color-scan-wave {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: 0;
    left: 0;
    opacity: 0;
    animation: pulse 2s infinite;
}

.color-scan-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
}

.analyzing-content h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.analyzing-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: bounce 1.4s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ============================================
   결과 화면
   ============================================ */

.result-content {
    padding: 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

.result-header {
    text-align: center;
    margin: 2rem 0;
}

.result-color-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: glow 2s infinite;
}

.result-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.result-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.result-description {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    line-height: 1.7;
    backdrop-filter: blur(10px);
}

.result-description p {
    margin: 0.8rem 0;
}

/* ============================================
   색상 의미
   ============================================ */

.color-meanings {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.color-meanings h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.color-meanings p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   강점 & 약점
   ============================================ */

.strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.strengths, .weaknesses {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.strengths h3, .weaknesses h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.strengths ul, .weaknesses ul {
    list-style: none;
}

.strengths li, .weaknesses li {
    padding: 0.7rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    position: relative;
    font-size: 0.95rem;
}

.strengths li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00b894;
    font-weight: bold;
    font-size: 1.1rem;
}

.weaknesses li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: #ffd93d;
    font-size: 0.7rem;
}

@media (max-width: 640px) {
    .strengths-weaknesses {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   호환성
   ============================================ */

.compatibility {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.compatible-types, .incompatible-types {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.compatible-types h4, .incompatible-types h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.type-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.type-item {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.type-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .compatibility {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   프리미엄 분석
   ============================================ */

.premium-analysis {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.premium-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.premium-content.hidden {
    display: none;
}

.premium-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.premium-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0.8rem 0;
}

#premium-analysis-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   공유 섹션
   ============================================ */

.share-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.share-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.share-btn {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-btn.download {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.share-btn.kakao {
    background: #FFE812;
    color: #3C1A1A;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.copy {
    background: var(--card-bg);
    border: 1.5px solid var(--text-secondary);
    color: var(--text-secondary);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none !important;
}

/* ============================================
   추천 섹션
   ============================================ */

.recommendations-section {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.rec-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.rec-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.rec-card:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.rec-icon {
    font-size: 2rem;
}

.rec-name {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.rec-card:hover .rec-name {
    color: var(--text-primary);
}

/* ============================================
   푸터
   ============================================ */

.game-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--card-border);
    margin-top: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-link:hover {
    color: var(--accent);
    background: rgba(255, 107, 107, 0.1);
}

/* ============================================
   컨페티 효과
   ============================================ */

.confetti {
    position: fixed;
    pointer-events: none;
    animation: confetti-fall 3s ease-in forwards;
}

/* ============================================
   반응형 디자인
   ============================================ */

@media (max-width: 640px) {
    .app-container {
        padding: 1rem 0.75rem;
    }

    .intro-content {
        padding: 1.5rem 1rem;
    }

    .color-types-preview {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }

    .color-badge {
        padding: 0.6rem 0.3rem;
        font-size: 0.7rem;
    }

    .quiz-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        margin: 1rem 0 1.5rem;
    }

    .progress-text {
        min-width: 35px;
    }

    .option {
        padding: 0.9rem 1.2rem;
        min-height: 52px;
    }

    .result-color-circle {
        width: 100px;
        height: 100px;
    }

    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) {
    .option:hover {
        background: var(--card-bg);
        border-color: var(--card-border);
    }

    .option:active {
        background: rgba(255, 107, 107, 0.1);
        border-color: var(--accent);
    }
}

/* 다크 모드 (기본값이 다크모드이므로 라이트모드 옵션) */
@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #f5f5f5;
        --darker-bg: #e8e8e8;
        --card-bg: rgba(0, 0, 0, 0.05);
        --card-border: rgba(0, 0, 0, 0.1);
        --text-primary: #1a1a3f;
        --text-secondary: #666666;
    }

    body {
        background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    }
}

/* 접근성 */
/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 5px;
    border: 2px solid var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb:hover {
    background: #eb6f63;
    opacity: 0.8;
}

/* Selection Color */
::selection {
    background: #e74c3c;
    color: white;
}

::-moz-selection {
    background: #e74c3c;
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* 스킵 링크 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible - Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}
