:root {
    --primary-color: #60463B;
    --secondary-color: #856A5D;
    --bg-color: #DFE0E2;
    --accent-color: #D4AF37;
    --text-color: #2c2c2c;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --deep-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7; /* 줄간격 확대 */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
    font-size: 16px; /* 기본 폰트 크기 16px 고정 */
}

.court-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

header h1 {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 15px; /* 간격 확대 */
    margin-bottom: 25px;
}

.lang-btn {
    padding: 10px 16px; /* 크기 확대 */
    border: 2px solid var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px; /* 터치 영역 최소 기준 */
    min-height: 44px;
}

.lang-btn.active {
    background: var(--secondary-color);
    color: white;
}

.lang-btn:hover:not(.active) {
    background: rgba(133, 106, 93, 0.1);
}

.description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-top: 15px;
    font-style: italic;
    opacity: 0.8;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.screen.active {
    display: block;
}

/* Cards */
.court-card, .result-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--deep-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.court-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--primary-color);
}

/* Input Groups */
.input-group {
    text-align: left;
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

input[type="text"], textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px; /* 모바일 자동 확대 방지 */
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

input[type="text"] {
    margin-bottom: 20px;
    height: 54px;
}

textarea {
    height: 130px;
    resize: none;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(133, 106, 93, 0.1);
}

.divider {
    margin: 35px 0;
    font-family: 'Nanum Myeongjo', serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--secondary-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
    margin: 0 20px;
}

/* Buttons */
.hammer-btn {
    width: 100%;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 0 #3e2d26;
    min-height: 60px;
}

.hammer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3e2d26;
    background-color: #715246;
}

.hammer-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #3e2d26;
}

.hammer-icon {
    font-size: 1.6rem;
}

.watermark {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 25px;
    opacity: 0.5;
    text-align: center;
}

.share-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 35px;
}

.main-share {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.social-share-standalone {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.social-btn {
    width: 48px; /* 44px 이상 확대 */
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    font-weight: bold;
    font-size: 20px;
    padding: 0;
}

.social-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.social-btn.kakao { background-color: #FEE500; }
.social-btn.facebook { background-color: #1877F2; color: white; font-family: Arial, sans-serif; }
.social-btn.x { background-color: #000000; color: white; }

.icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: white;
    border: 2px solid #eee;
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s;
    min-width: 110px;
    min-height: 80px; /* 터치 영역 확보 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.icon-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

#capture-area {
    padding: 15px;
    background: var(--bg-color);
    border-radius: 20px;
}

.btn-group {
    margin-top: 25px;
}

.secondary-btn, .accent-btn {
    padding: 18px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
}

.secondary-btn { background: #f0f0f0; color: #666; }
.accent-btn { background: var(--primary-color); color: white; }

/* Loading Screen */
.loading-content {
    padding: 60px 0;
}

.gavel-animation {
    font-size: 4.5rem;
    margin-bottom: 25px;
    animation: hammerSwing 0.8s infinite;
}

#loading-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-style: italic;
}

/* Result Screen */
.winner-badge {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 800;
    margin-bottom: 25px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.verdict-content h2 {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.verdict-body {
    background: #fdfaf5;
    padding: 25px;
    border-radius: 14px;
    border-left: 6px solid var(--secondary-color);
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.2rem;
    color: #444;
}

.punishment {
    padding: 25px;
    background: #fff5f5;
    border-radius: 12px;
    font-size: 1.1rem;
    color: #d63031;
    margin-top: 0;
}

footer {
    margin-top: 50px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid #ddd;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 12px;
    font-weight: bold;
    display: inline-block;
    padding: 10px 0; /* 터치 영역 확대 */
}

.footer-links a:hover { text-decoration: underline; }

.extra-content {
    margin-top: 60px;
    padding: 35px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    line-height: 1.9;
    text-align: left;
}

.sub-title {
    font-family: 'Nanum Myeongjo', serif;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

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

@keyframes hammerSwing {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-45deg); }
    100% { transform: rotate(0deg); }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body { padding: 15px; }
    header h1 { font-size: 2.2rem; }
    .court-card, .result-card { padding: 25px; }
    .btn-group { grid-template-columns: 1fr; }
}
