@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css");

:root {
    --primary-color: #3b82f6;
    --primary-hover: #1d4ed8;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* 모바일 전용 컨테이너 (최대 480px) */
.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    background-color: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

/* 헤더 & 슬라이드 메뉴 */
.mobile-header {
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header .logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    display: block;
    width: 22px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 3선 슬라이드 사이드 바 */
.side-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    z-index: 200;
    transition: right 0.3s ease;
    padding: 30px 20px;
    box-sizing: border-box;
}

.side-menu.active {
    right: 0;
}

.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 150;
    display: none;
}

.side-menu-overlay.active {
    display: block;
}

.side-menu .close-btn {
    text-align: right;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu ul li {
    margin-bottom: 20px;
}

.side-menu ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

/* 폼 스타일 */
.content-body {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.banner-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    object-fit: cover;
}

.form-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.form-desc {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.input-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    background-color: #f9fafb;
    transition: all 0.2s;
}

.input-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 약관 텍스트 박스 */
.terms-box {
    width: 100%;
    height: 90px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #f9fafb;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* 버튼 */
.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

/* 에러 메시지 뷰 */
.error-view {
    text-align: center;
    margin: auto;
    padding: 30px;
}

.error-view h2 {
    color: #ef4444;
    margin-bottom: 10px;
}

.error-view p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* 스크래치 복권 스타일 */
.scratch-container {
    width: 100%;
    aspect-ratio: 16/10; /* 복권 비율 */
    margin: 25px 0;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scratch-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    z-index: 1;
}

.scratch-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
}
