/* judge-ai.css - 판결의 전당 메인 스타일 */

/* 폰트 */
@font-face {
    font-family: 'DungGeunMo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* CSS 변수 */
:root {
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --accent-gold: #ffd700;
    --accent-red: #ff6b6b;
    --accent-green: #4ecdc4;
    --accent-purple: #a855f7;
    --text-light: #eee;
    --pixel-border: 4px;
}

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

body {
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    background-color: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
}

/* 스캔라인 효과 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* CRT 효과 */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 999;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ===================== */
/* 헤더 스타일 */
/* ===================== */
header {
    text-align: center;
    padding: 30px 0;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 0.9; }
    94% { opacity: 1; }
    97% { opacity: 0.95; }
}

.title-container {
    position: relative;
    display: inline-block;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--accent-gold);
    text-shadow:
        4px 4px 0 #b8860b,
        -2px -2px 0 #fff,
        0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.subtitle {
    font-size: clamp(0.7rem, 2vw, 1rem);
    color: var(--accent-green);
    margin-top: 15px;
    text-shadow: 2px 2px 0 #0f766e;
}

/* ===================== */
/* 판사 캐릭터 */
/* ===================== */
.judge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.judge-pixel {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    border: var(--pixel-border) solid var(--accent-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: judgeFloat 3s ease-in-out infinite;
    box-shadow:
        8px 8px 0 rgba(0,0,0,0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
}

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

/* 말풍선 스타일 */
.speech-bubble {
    position: relative;
    background: var(--accent-gold);
    color: var(--bg-dark);
    padding: 12px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
    border: 3px solid #b8860b;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    animation: bubbleBounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.speech-bubble:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
    animation: none;
}

.speech-bubble::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: var(--accent-gold);
    border-left: none;
}

.speech-bubble:hover::before {
    border-right-color: #fff;
}

.speech-bubble .bubble-icon {
    margin-right: 5px;
}

@keyframes bubbleBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ===================== */
/* 입력 영역 */
/* ===================== */
.input-section {
    background: linear-gradient(180deg, var(--bg-medium) 0%, #0f172a 100%);
    border: var(--pixel-border) solid var(--accent-purple);
    border-radius: 0;
    padding: 25px;
    margin: 20px 0;
    box-shadow:
        8px 8px 0 rgba(168, 85, 247, 0.3),
        inset 0 0 30px rgba(168, 85, 247, 0.1);
    image-rendering: pixelated;
}

.input-label {
    display: block;
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    color: var(--accent-gold);
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #b8860b;
}

.input-label::before {
    content: "▶ ";
    color: var(--accent-green);
    animation: blink 1s infinite;
}

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

textarea {
    width: 100%;
    height: 180px;
    background: #0a0a15;
    border: 3px solid #333;
    border-radius: 0;
    color: var(--text-light);
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 15px;
    resize: none;
    outline: none;
    transition: all 0.3s;
    line-height: 1.8;
}

textarea:focus {
    border-color: var(--accent-green);
    box-shadow:
        0 0 20px rgba(78, 205, 196, 0.3),
        inset 0 0 10px rgba(78, 205, 196, 0.1);
}

textarea::placeholder {
    color: #555;
}

/* ===================== */
/* 예시 섹션 */
/* ===================== */
.example-section {
    margin-top: 15px;
}

.example-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #333;
}

.example-tab {
    background: transparent;
    border: 2px solid #4b5563;
    color: #9ca3af;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.55rem, 1.3vw, 0.7rem);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
}

.example-tab:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.example-tab.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-btn {
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border: 2px solid #4b5563;
    color: #9ca3af;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.example-btn:hover {
    background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.example-btn[data-category="chat"] { border-color: #60a5fa; }
.example-btn[data-category="chat"]:hover { border-color: #93c5fd; color: #93c5fd; }
.example-btn[data-category="sns"] { border-color: #f472b6; }
.example-btn[data-category="sns"]:hover { border-color: #f9a8d4; color: #f9a8d4; }
.example-btn[data-category="situation"] { border-color: #4ade80; }
.example-btn[data-category="situation"]:hover { border-color: #86efac; color: #86efac; }
.example-btn.hidden { display: none; }

/* ===================== */
/* 판결 버튼 */
/* ===================== */
.judge-btn {
    width: 100%;
    padding: 20px;
    margin-top: 20px;
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 50%, #7f1d1d 100%);
    border: var(--pixel-border) solid #fca5a5;
    color: white;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(1rem, 3vw, 1.3rem);
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 2px 2px 0 #7f1d1d;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.judge-btn::before { content: "⚖️ "; }
.judge-btn::after { content: " ⚖️"; }

.judge-btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
}

.judge-btn:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

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

/* ===================== */
/* 로딩 애니메이션 */
/* ===================== */
.loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.loading.active { display: block; }

.loading-text {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--accent-gold);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

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

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-purple);
    animation: dotBounce 0.6s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* ===================== */
/* 결과 영역 */
/* ===================== */
.result-section {
    display: none;
    margin-top: 30px;
    animation: resultAppear 0.5s ease-out;
}

.result-section.active { display: block; }

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

.verdict-box {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0a2e 100%);
    border: var(--pixel-border) solid;
    padding: 25px;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

.verdict-box.guilty { border-color: var(--accent-red); }
.verdict-box.innocent { border-color: var(--accent-green); }
.verdict-box.draw { border-color: var(--accent-gold); }
.verdict-box.invalid { border-color: #6b7280; }

.verdict-header {
    text-align: center;
    margin-bottom: 20px;
}

.verdict-stamp {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: bold;
    padding: 10px 20px;
    display: inline-block;
    transform: rotate(-5deg);
    animation: stampIn 0.3s ease-out;
}

@keyframes stampIn {
    from { transform: rotate(-5deg) scale(2); opacity: 0; }
    to { transform: rotate(-5deg) scale(1); opacity: 1; }
}

.verdict-stamp.guilty {
    color: var(--accent-red);
    text-shadow: 3px 3px 0 #7f1d1d;
    border: 4px solid var(--accent-red);
}

.verdict-stamp.innocent {
    color: var(--accent-green);
    text-shadow: 3px 3px 0 #0f766e;
    border: 4px solid var(--accent-green);
}

.verdict-stamp.draw {
    color: var(--accent-gold);
    text-shadow: 3px 3px 0 #b8860b;
    border: 4px solid var(--accent-gold);
}

.verdict-stamp.invalid {
    color: #6b7280;
    text-shadow: 3px 3px 0 #374151;
    border: 4px solid #6b7280;
}

.verdict-content {
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 2;
    color: #d1d5db;
    white-space: pre-wrap;
}

.verdict-content p { margin-bottom: 15px; }

/* ===================== */
/* 공유 버튼 영역 */
/* ===================== */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.share-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border: 3px solid #6b7280;
    color: var(--text-light);
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.share-btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    border-color: var(--accent-gold);
}

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

.share-btn.image-btn {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    border-color: #34d399;
}
.share-btn.image-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.share-btn.link-btn {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #60a5fa;
}
.share-btn.link-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.share-btn.objection-btn {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border-color: #fbbf24;
}
.share-btn.objection-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

/* 다시 판결 버튼 */
.retry-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border: 3px solid #6b7280;
    color: var(--text-light);
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.8rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.retry-btn:hover {
    background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
    border-color: var(--accent-gold);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
}

/* ===================== */
/* 푸터 */
/* ===================== */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 2px dashed #333;
}

.footer-text {
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    color: #6b7280;
}

.footer-pixel {
    margin-top: 15px;
    font-size: 24px;
}

/* ===================== */
/* 장식 요소 */
/* ===================== */
.decoration {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.star {
    color: var(--accent-gold);
    opacity: 0.3;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ===================== */
/* 판사 선택 섹션 */
/* ===================== */
.judge-select-section { margin-bottom: 20px; }

.judge-select-label {
    display: block;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: var(--accent-green);
    margin-bottom: 12px;
    text-shadow: 1px 1px 0 #0f766e;
}

.judge-select-label::before { content: "🎭 "; }

.judge-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.judge-card {
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border: 3px solid #4b5563;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.judge-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
}

.judge-card.selected {
    border-color: var(--accent-gold);
    background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.judge-card.selected::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 8px;
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.judge-card-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.judge-card-name {
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    color: var(--text-light);
    font-weight: bold;
    margin-bottom: 4px;
}

.judge-card-desc {
    font-size: clamp(0.55rem, 1.2vw, 0.65rem);
    color: #9ca3af;
    line-height: 1.4;
}

/* ===================== */
/* 히스토리 섹션 */
/* ===================== */
.history-section {
    margin-top: 40px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border: 2px dashed #333;
}

.history-title {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--accent-purple);
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #581c87;
}

.history-item {
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--accent-gold);
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s;
}

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

.history-item .case-preview {
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item .verdict-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-top: 5px;
    font-size: 0.7rem;
}

.verdict-badge.guilty { background: var(--accent-red); color: white; }
.verdict-badge.innocent { background: var(--accent-green); color: white; }
.verdict-badge.draw { background: var(--accent-gold); color: black; }
.verdict-badge.invalid { background: #6b7280; color: white; }

.history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.history-share-link {
    font-size: 0.9rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.history-share-link:hover {
    opacity: 1;
}

/* ===================== */
/* 인기 판결 랭킹 */
/* ===================== */
.popular-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 2px solid var(--accent-gold);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.popular-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--accent-gold);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #92400e;
    text-align: center;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popular-loading {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
    font-size: 0.9rem;
}

.popular-empty {
    text-align: center;
    color: #6b7280;
    padding: 30px;
    font-size: 0.9rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0,0,0,0.3);
    border-left: 3px solid var(--accent-gold);
    cursor: pointer;
    transition: all 0.2s;
}

.popular-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    border-left-color: var(--accent-purple);
}

.popular-rank {
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #000;
}

.popular-rank.top3 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.popular-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    font-size: 1rem;
}

.popular-rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
}

.popular-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
}

.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-case {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.popular-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}

.popular-verdict {
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
}

.popular-verdict.guilty { background: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.popular-verdict.innocent { background: rgba(34, 197, 94, 0.3); color: #86efac; }
.popular-verdict.draw { background: rgba(245, 158, 11, 0.3); color: #fcd34d; }
.popular-verdict.invalid { background: rgba(107, 114, 128, 0.3); color: #d1d5db; }

.popular-views {
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.popular-views::before {
    content: "👁";
    font-size: 0.8rem;
}

/* 인기 판결 카테고리 탭 */
.popular-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px dashed #333;
}

.popular-category-tab {
    background: transparent;
    border: 2px solid #4b5563;
    color: #9ca3af;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.55rem, 1.3vw, 0.7rem);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
}

.popular-category-tab:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-1px);
}

.popular-category-tab.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.popular-category-badge {
    font-size: 0.9rem;
    margin-right: 2px;
}

/* ===================== */
/* 사용 횟수 표시 */
/* ===================== */
.usage-counter {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(26, 26, 46, 0.9);
    border: 2px solid var(--accent-purple);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: var(--text-light);
    z-index: 100;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.usage-counter-number {
    color: var(--accent-gold);
    font-weight: bold;
}

/* ===================== */
/* 제한 모달 */
/* ===================== */
.limit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.limit-modal.active { display: flex; }

.limit-modal-content {
    background: linear-gradient(180deg, var(--bg-medium) 0%, #0f172a 100%);
    border: 6px solid var(--accent-gold);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.limit-modal-header { text-align: center; margin-bottom: 30px; }

.limit-modal-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: var(--accent-gold);
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #b8860b;
}

.limit-modal-subtitle {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--text-light);
    line-height: 1.8;
}

.limit-modal-count {
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: var(--accent-red);
    margin: 20px 0;
    text-shadow: 2px 2px 0 #7f1d1d;
}

.limit-modal-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.limit-option-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    border: 3px solid #6b7280;
    color: var(--text-light);
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.8rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    text-align: center;
}

.limit-option-btn.primary {
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    border-color: #fca5a5;
}

.limit-option-btn.secondary {
    background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
    border-color: #c4b5fd;
}

.limit-option-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
}

.limit-option-btn.primary:hover {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.limit-option-btn.secondary:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
}

.limit-modal-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-left: 3px solid var(--accent-green);
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: #9ca3af;
    line-height: 1.6;
}

/* ===================== */
/* 후원 슬라이드 패널 */
/* ===================== */
.donation-slide {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-medium) 0%, #0f172a 100%);
    border-left: 4px solid var(--accent-gold);
    z-index: 2001;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    box-shadow: -8px 0 30px rgba(0,0,0,0.5);
}

.donation-slide.active { right: 0; }

.donation-slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.donation-slide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.donation-slide-header {
    padding: 20px;
    border-bottom: 2px solid var(--accent-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
}

.donation-slide-title {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--accent-gold);
    text-shadow: 2px 2px 0 #b8860b;
}

.donation-slide-close {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.donation-slide-close:hover {
    background: var(--accent-gold);
    color: var(--bg-dark);
    transform: rotate(90deg);
}

.donation-slide-content { padding: 20px; }

.account-info {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    border: 3px solid #3b82f6;
    padding: 20px;
    margin-top: 15px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.account-info.active { display: block; }

.account-label {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: #bfdbfe;
    margin-bottom: 10px;
}

.account-number {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--accent-gold);
    font-weight: bold;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    margin: 10px 0;
    word-spacing: 5px;
    letter-spacing: 2px;
}

.account-holder {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: var(--text-light);
    margin-top: 10px;
}

.copy-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: 2px solid #60a5fa;
    color: white;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.copy-btn:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}

.copy-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

/* 이메일 입력 섹션 */
.email-input-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border: 2px solid var(--accent-purple);
    border-radius: 5px;
}

.email-input-label {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: var(--accent-gold);
    margin-bottom: 10px;
    display: block;
}

.email-input {
    width: 100%;
    padding: 10px;
    background: #0a0a15;
    border: 2px solid #333;
    border-radius: 0;
    color: var(--text-light);
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    margin-bottom: 10px;
    outline: none;
}

.email-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.email-submit-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border: 2px solid #34d399;
    color: white;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.email-submit-btn:hover {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
}

.email-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===================== */
/* 광고 모달 */
/* ===================== */
.ad-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.ad-modal.active { display: flex; }

.ad-modal-content {
    background: linear-gradient(180deg, var(--bg-medium) 0%, #0f172a 100%);
    border: 4px solid var(--accent-gold);
    padding: 25px;
    max-width: 450px;
    width: 95%;
    position: relative;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
}

.ad-modal-header { text-align: center; margin-bottom: 20px; }

.ad-modal-title {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--accent-gold);
    margin-bottom: 8px;
    text-shadow: 2px 2px 0 #b8860b;
}

.ad-modal-subtitle {
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    color: #9ca3af;
}

.ad-container {
    background: #000;
    border: 3px solid #333;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.ad-container::before {
    content: "광고 로딩 중...";
    position: absolute;
    color: #666;
    font-size: 0.9rem;
    z-index: 0;
}

.ad-container .kakao_ad_area {
    position: relative;
    z-index: 1;
}

.ad-timer-section { margin-bottom: 20px; }

.ad-progress-bar {
    width: 100%;
    height: 12px;
    background: #1f2937;
    border: 2px solid #374151;
    overflow: hidden;
    margin-bottom: 10px;
}

.ad-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
    transition: width 1s linear;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.ad-timer-text {
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: var(--text-light);
}

.ad-timer-text span {
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 1.1em;
}

.ad-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-complete-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border: 3px solid #34d399;
    color: white;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.ad-complete-btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

.ad-complete-btn:disabled {
    background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
    border-color: #6b7280;
    cursor: not-allowed;
    opacity: 0.8;
}

.ad-cancel-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 2px solid #6b7280;
    color: #9ca3af;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s;
}

.ad-cancel-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* 메인 페이지 광고 섹션 */
.main-ad-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed #333;
    border-radius: 8px;
    min-height: 280px;
}

.main-ad-section .kakao_ad_area { margin: 0 auto; }

/* ===================== */
/* 이의제기 모달 */
/* ===================== */
.objection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3001;
    align-items: center;
    justify-content: center;
}

.objection-modal.active { display: flex; }

.objection-modal-content {
    background: linear-gradient(180deg, var(--bg-medium) 0%, #0f172a 100%);
    border: 4px solid #f59e0b;
    padding: 30px;
    max-width: 600px;
    width: 95%;
    position: relative;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    animation: modalAppear 0.3s ease-out;
}

.objection-modal-header { text-align: center; margin-bottom: 25px; }

.objection-modal-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    color: #fbbf24;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #d97706;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
}

.objection-modal-subtitle {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    color: #9ca3af;
    line-height: 1.6;
}

.objection-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.objection-label {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-light);
    font-weight: bold;
    margin-bottom: 8px;
}

.objection-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid #4b5563;
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Galmuri11', monospace;
    font-size: clamp(0.85rem, 2vw, 1rem);
    resize: vertical;
    transition: border-color 0.3s;
}

.objection-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.objection-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.objection-submit-btn {
    flex: 1;
    padding: 15px;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border: 3px solid #fbbf24;
    color: white;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.objection-submit-btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.objection-submit-btn:disabled {
    background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
    border-color: #6b7280;
    cursor: not-allowed;
    opacity: 0.8;
}

.objection-cancel-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: 2px solid #6b7280;
    color: #9ca3af;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    cursor: pointer;
    transition: all 0.2s;
}

.objection-cancel-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* 이의제기 히스토리 */
.objection-history {
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #f59e0b;
    border-radius: 8px;
}

.objection-history-title {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #fbbf24;
    margin-bottom: 15px;
    font-family: 'DungGeunMo', 'Press Start 2P', monospace;
}

.objection-item {
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
}

.objection-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.objection-item-date {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: #9ca3af;
}

.objection-item-content {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.objection-item-result {
    padding-top: 10px;
    border-top: 1px solid #374151;
}

.objection-item-result-label {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    color: #9ca3af;
    margin-bottom: 5px;
}

.objection-item-stamp {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    font-weight: bold;
}

.objection-item-stamp.guilty {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 2px solid #ef4444;
}

.objection-item-stamp.innocent {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 2px solid #22c55e;
}

.objection-item-stamp.draw {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 2px solid #f59e0b;
}

@keyframes objectionShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.objection-shake { animation: objectionShake 0.5s ease-in-out; }

/* ===================== */
/* 반응형 스타일 */
/* ===================== */
@media (max-width: 768px) {
    .container { padding: 15px; }
    header { padding: 20px 0; }
    .judge-pixel { width: 80px; height: 80px; font-size: 40px; }
    .input-section { padding: 15px; }
    textarea { height: 150px; padding: 10px; }
    .example-buttons { gap: 8px; }
    .example-btn { padding: 6px 10px; }
    .judge-btn { padding: 15px; }
    .verdict-box { padding: 15px; }
    .limit-modal-content { padding: 25px; }
    .usage-counter { top: 120px; right: 10px; padding: 8px 12px; }
    .donation-slide { max-width: 100%; }
}

@media (max-width: 480px) {
    .judge-pixel { width: 60px; height: 60px; font-size: 30px; }
    .example-btn { font-size: 0.6rem; padding: 5px 8px; }
    .judge-cards { grid-template-columns: repeat(2, 1fr); }
    .judge-card { padding: 10px 6px; }
    .judge-card-emoji { font-size: 1.5rem; }
    .ad-modal-content { padding: 15px; }
    .ad-container { min-height: 200px; }
}

/* 픽셀 아트 테두리 효과 */
.pixel-border { position: relative; }
.pixel-border::before,
.pixel-border::after {
    content: "";
    position: absolute;
    background: var(--accent-gold);
}

/* ===================== */
/* 상단 정보 바 */
/* ===================== */
.top-info-bar {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.top-info-bar .usage-counter {
    position: static;
}

