.lotto-wrap {
    font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    background: #f4f5f7;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 12px 60px;
}

.lotto-wrap h1 {
    font-size: 22px;
    text-align: center;
    margin: 0 0 8px;
}

.lotto-header-row {
    position: relative;
    margin-bottom: 12px;
}

.lotto-nav {
    text-align: center;
    margin: 0 0 20px;
    font-size: 14px;
}

.lotto-nav a {
    color: #4486d4;
    text-decoration: none;
}

.lotto-nav a:hover {
    text-decoration: underline;
}

.lotto-gear {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lotto-gear:hover {
    background: #f0f0f0;
}

.lotto-latest {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 28px;
}

.lotto-latest-head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.lotto-latest-head strong {
    font-size: 20px;
    color: #333;
}

.lotto-date {
    color: #888;
    font-size: 14px;
}

.lotto-latest-balls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lotto-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

.lotto-list h2 {
    font-size: 16px;
    color: #555;
    margin: 0 0 12px 4px;
}

.lotto-list table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lotto-list th,
.lotto-list td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.lotto-list th {
    background: #fafafa;
    color: #666;
    font-weight: 600;
}

.lotto-list tr:last-child td {
    border-bottom: none;
}

.lotto-row-balls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.lotto-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.lotto-latest-balls .lotto-ball {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

.lotto-plus {
    color: #aaa;
    font-weight: 700;
    margin: 0 2px;
}

.ball-yellow { background: #fbc400; }
.ball-blue   { background: #69c8f2; }
.ball-red    { background: #ff7272; }
.ball-gray   { background: #aaa; }
.ball-green  { background: #b0d840; }

.lotto-generate {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-top: 28px;
}

.lotto-generate h2 {
    font-size: 16px;
    color: #555;
    margin: 0 0 14px;
}

.lotto-generate-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lotto-generate-controls select {
    flex: 1;
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.lotto-generate-controls button {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: #4486d4;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.lotto-generate-controls button:disabled {
    opacity: 0.6;
    cursor: default;
}

.lotto-generate-msg {
    min-height: 18px;
    margin: 12px 0 0;
    font-size: 13px;
    color: #888;
}

.lotto-generate-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.lotto-generate-set {
    justify-content: flex-start;
    background: #fafafa;
    border-radius: 8px;
    padding: 8px 10px;
}

/* 관리자 팝업창(admin.php/status.php)에서 쓰는 상품 테이블 - 좌측메뉴/우측콘텐츠 레이아웃
   자체는 css/admin.css 담당 */
.lotto-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.lotto-admin-table th,
.lotto-admin-table td {
    padding: 6px 4px;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.lotto-admin-table input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.lotto-admin-table button {
    border: none;
    background: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 13px;
}

.lotto-admin-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}

.lotto-admin-actions button {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#lotto-admin-add {
    background: #eee;
    color: #333;
}

#lotto-admin-save {
    background: #4486d4;
    color: #fff;
}
