/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 밝고 산뜻한 스터디카페 테마 색상 */
    --primary-color: #4ECDC4;  /* 밝은 청록색 */
    --primary-dark: #3AAFA9;
    /* 흰 배경 위 본문용 진한 청록.
       --primary-dark(#3AAFA9)는 흰 배경에서 대비가 약 2.5:1이라
       로딩 문구처럼 읽어야 하는 글자에 쓰면 잘 안 보인다. */
    --primary-deep: #27706B;
    --primary-light: #7EDDD8;
    --success-color: #52c41a;
    --error-color: #ff6b6b;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-cream: #ffffff;
    --white: #ffffff;
    --accent-blue: #4ECDC4;
    --accent-purple: #a8dadc;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
                 "Noto Sans KR", "Noto Serif KR", sans-serif;
    /* 더욱 밝고 산뜻한 그라디언트 - 파스텔 톤 */
    background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 30%, #b3e5fc 70%, #81d4fa 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* 산뜻한 오버레이 효과 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 75%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 85% 25%, rgba(78, 205, 196, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(129, 212, 250, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* 헤더 */
header {
    text-align: center;
    padding: 30px 20px;
    position: relative;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.site-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: var(--primary-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 책 아이콘 추가 */
.site-title::before {
    content: '📚 ';
    font-size: 20px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-family: "Noto Serif KR", serif;
}

/* 인증 메뉴 (로그인/회원가입) */
.auth-menu {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.auth-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--white);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-light);
}

.auth-link::before {
    content: '🔑 ';
    font-size: 14px;
}

.auth-link.secondary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-dark);
}

.auth-link.secondary::before {
    content: '✍️ ';
}

.auth-link:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.auth-link.secondary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(58, 175, 169, 0.5);
}

/* 사용자 메뉴 (로그인 후) */
.user-menu {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.user-info {
    background: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--primary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.logout-btn {
    padding: 8px 20px;
    background: var(--error-color);
    color: var(--white);
    border: 2px solid #ff5252;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.logout-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

/* 뒤로가기 링크 */
.back-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-link:hover {
    background: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* 로그인 카드 */
.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid var(--primary-light);
}

.login-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.login-btn::before {
    content: '🔐 ';
    margin-right: 5px;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

.login-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.signup-link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.signup-link-text:hover {
    text-decoration: underline;
}

/* 메인 컨텐츠 */
main {
    flex: 1;
}

/* 검색 카드 - 심플하고 깔끔한 디자인 */
.search-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid var(--primary-light);
    position: relative;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.form-group select {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-family: inherit;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%23718096' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 46px;
}

/* 조회 중에는 자녀를 바꿀 수 없다 (요청과 결과가 어긋나는 것을 막는다) */
.form-group select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--border-color);
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 자녀 전화번호 입력 목록 */
.child-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.child-phone-row input {
    flex: 1;
    min-width: 0;
}

.remove-child-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-child-btn:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fee2e2;
}

.add-child-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--primary-dark);
    background: var(--bg-light);
    border: 2px dashed var(--primary-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-child-btn:hover {
    background: rgba(78, 205, 196, 0.12);
    border-color: var(--primary-color);
}

.add-child-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 비밀번호 표시 토글 (입력란 바로 아래) */
.password-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    margin-left: -4px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-toggle .password-toggle-icon {
    font-size: 15px;
    line-height: 1;
}

.password-toggle:hover {
    background: rgba(78, 205, 196, 0.12);
    color: var(--text-primary);
}

.password-toggle.is-visible {
    color: var(--primary-dark);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 아이디 저장하기 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.remember-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-id input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.remember-id:hover {
    color: var(--text-primary);
}

/* 검색 버튼 - 밝고 심플한 스타일 */
.search-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.search-btn::before {
    content: '🔍 ';
    margin-right: 5px;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

.search-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 결과 섹션 */
#resultSection {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid var(--primary-light);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.result-header h2 {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 700;
}

.result-header h2::before {
    content: '📋 ';
    margin-right: 5px;
}

.result-count {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* 저장해 둔 조회 결과 안내 (창을 닫았다 다시 들어온 경우) */
.saved-result-note {
    background: #fff8e6;
    border-left: 3px solid #f0b429;
    border-radius: 0 10px 10px 0;
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #7a5a12;
}

.saved-result-note strong {
    font-weight: 700;
}

/* 사용자 카드 - 심플하고 깔끔한 디자인 */
.user-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.user-card:hover {
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.2);
    transform: translateY(-2px);
    border-left-color: var(--primary-dark);
}

.user-card:last-child {
    margin-bottom: 0;
}

.user-field {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.user-field:last-child {
    border-bottom: none;
}

.user-field-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    font-size: 14px;
}

.user-field-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 15px;
    word-break: break-all;
}

/* 자녀 선택 즉시 표시되는 빠른 상태 카드 */
.quick-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
}

.quick-status.studying {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.quick-status.away {
    background: #fef3c7;
    border-color: #fcd34d;
}

.quick-status.left {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.quick-status-icon {
    font-size: 26px;
    line-height: 1;
}

.quick-status-label {
    display: block;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
}

/* inline이면 margin-top이 먹지 않아 라벨과 같은 줄에 붙는다.
   "공부중 / 12번 자유석"이 두 줄로 보이도록 블록으로 둔다. */
.quick-status-detail {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 아이콘이 여러 줄 텍스트와 세로 가운데가 아니라 위쪽에 맞도록 */
.quick-status {
    align-items: flex-start;
}

.quick-status-icon {
    margin-top: 2px;
}

/* 퇴실 시간을 읽어오는 동안의 표시.
   기본 상세 문구는 회색 작은 글씨라 «퇴실함» 옆에서 눈에 띄지 않는다.
   확인 중일 때만 흰 알약으로 띄워 지금 뭔가 진행 중임을 알린다. */
.quick-status-detail.checking {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: 999px;
    background: var(--white);
    border: 1.5px solid var(--primary-color);
    box-shadow: 0 1px 4px rgba(58, 175, 169, 0.2);
    color: var(--primary-deep);
    font-size: 13.5px;
    font-weight: 700;
}

.checking-icon {
    font-size: 14px;
    line-height: 1;
    animation: checkingPulse 1.4s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .checking-icon { animation: none; }
}

/* 확인 중 점 애니메이션 (. → .. → ... → ..)
   퇴실 시각을 읽어오는 데 8~13초가 걸리는데, 그동안 글자가 멈춰 있으면
   화면이 멈춘 것처럼 보인다. 점이 늘었다 줄었다 하면 살아 있다는 게 보인다. */
.checking-dots {
    display: inline-block;
    margin-left: 1px;
}

.checking-dots i {
    font-style: normal;
}

.checking-dots i:nth-child(2) {
    animation: checkingDot2 1.4s infinite;
}

.checking-dots i:nth-child(3) {
    animation: checkingDot3 1.4s infinite;
}

@keyframes checkingDot2 {
    0%, 24.9%   { opacity: 0; }
    25%, 100%   { opacity: 1; }
}

@keyframes checkingDot3 {
    0%, 49.9%   { opacity: 0; }
    50%, 74.9%  { opacity: 1; }
    75%, 100%   { opacity: 0; }
}

/* 애니메이션을 끈 기기에서는 점 세 개를 그대로 보여준다 */
@media (prefers-reduced-motion: reduce) {
    .checking-dots i {
        animation: none;
        opacity: 1;
    }
}

/* 빠른 확인이 끝난 뒤 나타나는 «자세히 조회» 영역 */
.detail-action {
    animation: detailActionIn 0.25s ease-out;
}

@keyframes detailActionIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .detail-action { animation: none; }
}

.search-hint {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

/* 좌석 세부 상태 배지 (공부중 / 외출중 / 퇴실함) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.status-badge .status-icon {
    font-size: 13px;
    line-height: 1;
}

.status-badge.studying {
    color: #047857;
    background: #d1fae5;
}

.status-badge.away {
    color: #b45309;
    background: #fef3c7;
}

.status-badge.left {
    color: #4b5563;
    background: #e5e7eb;
}

.status-detail {
    margin-left: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 섹션 헤더 - 심플한 디자인 */
.section-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    padding-left: 8px;
    border-bottom: 2px solid var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* 서비스 이용 정보 섹션 */
.service-info-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.service-field {
    display: flex;
    padding: 8px 0;
    font-size: 14px;
}

.service-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 90px;
}

.service-value {
    flex: 1;
    color: var(--text-primary);
}

/* 이용 로그 섹션 */
.usage-logs-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.usage-logs-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.usage-log-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.usage-log-item:hover {
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.15);
    transform: translateX(3px);
    border-left-color: var(--primary-dark);
}

.usage-log-item::before {
    content: '⏱️';
    margin-right: 8px;
    opacity: 0.6;
}

.log-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.log-start, .log-end {
    font-weight: 500;
}

.log-separator {
    color: var(--text-secondary);
}

.log-duration {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    background: rgba(78, 205, 196, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.more-logs-info {
    text-align: center;
    padding: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* 신청 대기 상태 카드 */
.pending-status-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 20px;
    border: 3px solid #ffc107;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pending-status-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.05) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.pending-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: spin 3s linear infinite;
}

.pending-title {
    font-size: 22px;
    font-weight: 700;
    color: #f57c00;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.pending-message {
    font-size: 16px;
    color: #856404;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* 안내 카드 */
.info-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 3px solid #ffc107;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.15);
    position: relative;
}

.info-card::before {
    content: '💡';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    opacity: 0.3;
}

.info-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.info-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.info-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffc107;
    font-weight: bold;
    font-size: 18px;
}

/* 회원가입 카드 */
.signup-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid var(--primary-light);
}

.signup-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--success-color) 0%, #3da50a 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.signup-btn::before {
    content: '✅ ';
    margin-right: 5px;
}

.signup-btn:hover {
    background: linear-gradient(135deg, #3da50a 0%, #2d7a06 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

.signup-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 성공 카드 */
.success-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(82, 196, 26, 0.15);
    text-align: center;
    border: 3px solid var(--success-color);
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.success-message {
    font-size: 18px;
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.6;
}

.primary-btn {
    display: inline-block;
    padding: 14px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 에러 카드 */
.error-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
    text-align: center;
    border: 3px solid var(--error-color);
}

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.error-message {
    font-size: 16px;
    color: var(--error-color);
    font-weight: 500;
    white-space: pre-line;
}

/* 로딩 카드 - 밝고 산뜻한 디자인 */
.loading-card {
    background: var(--white);
    border-radius: 20px;
    /* 스피너를 가운데 두던 시절의 여백(50px 40px)은 진행 막대에는 과하다 */
    padding: 30px 28px;
    box-shadow: 0 8px 32px rgba(78, 205, 196, 0.15);
    text-align: left;
    border: 3px solid var(--primary-light);
    position: relative;
    overflow: hidden;
}

/* 배경 물결 효과 */
.loading-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.05) 0%, transparent 70%);
    animation: wave 8s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(20px, 20px) rotate(180deg);
    }
}

/* .pending-icon(승인 대기 ⏳)이 쓰는 회전 애니메이션 */
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 진행 막대 — 스피너와 달리 "얼마나 왔는지"를 보여준다 */
.loading-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(78, 205, 196, 0.18);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.loading-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transition: width .3s linear;
}

/* 실제 처리 단계 (app/scraper.py의 순서) */
.loading-steps {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.loading-steps span.on {
    color: var(--primary-deep);
    font-weight: 600;
}

.loading-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.loading-text {
    font-size: 17px;
    font-weight: 600;
    /* 청록(--primary-dark)은 흰 배경에서 흐리게 보여 먹색으로 바꿨다.
       예전에는 여기에 opacity가 오르내리는 애니메이션까지 걸려 있어
       읽는 동안 계속 흐려졌다. */
    color: var(--text-primary);
    font-family: "Noto Sans KR", sans-serif;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.loading-countdown {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-deep);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex: none;
}

/* 조회가 1분 가까이 걸려 중간에 창을 닫는 경우가 있어 눈에 띄게 둔다 */
.loading-subtext {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-deep);
    line-height: 1.6;
    margin-top: 14px;
    padding: 9px 12px;
    text-align: left;
    background: rgba(78, 205, 196, 0.12);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    position: relative;
    z-index: 1;
}

/* 푸터 */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-top: 20px;
}

footer::before {
    content: '📚';
    margin-right: 8px;
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 20px 10px;
    }

    .site-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    header h1 {
        font-size: 24px;
    }

    .signup-link,
    .back-link {
        font-size: 13px;
        padding: 6px 16px;
    }

    .info-card {
        padding: 20px;
    }

    .info-icon {
        font-size: 28px;
    }

    .info-title {
        font-size: 16px;
    }

    .info-list li {
        font-size: 13px;
    }

    .signup-card {
        padding: 20px;
    }

    .signup-btn {
        font-size: 16px;
        padding: 16px;
    }

    .success-card {
        padding: 30px;
    }

    .success-icon {
        font-size: 52px;
    }

    .success-message {
        font-size: 16px;
    }

    .search-card,
    #resultSection,
    .error-card,
    .loading-card {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .loading-text { font-size: 15px; }
    .loading-countdown { font-size: 12px; }
    .loading-steps { font-size: 10px; }
    .loading-subtext { font-size: 12px; }

    .form-group input {
        font-size: 16px;
        padding: 14px;
    }

    .search-btn {
        font-size: 16px;
        padding: 16px;
    }

    .user-card {
        padding: 15px;
    }

    .user-field {
        flex-direction: column;
        gap: 5px;
    }

    .user-field-label {
        min-width: auto;
        font-size: 13px;
    }

    .user-field-value {
        font-size: 14px;
    }

    .section-header {
        font-size: 15px;
        margin-top: 15px;
    }

    .service-field {
        flex-direction: column;
        gap: 4px;
        padding: 6px 0;
    }

    .service-label {
        min-width: auto;
        font-size: 13px;
    }

    .service-value {
        font-size: 13px;
    }

    .usage-log-item {
        padding: 10px;
    }

    .log-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 12px;
    }

    .log-duration {
        font-size: 13px;
    }

    /* --- 이용자 조회 화면 (2026-09-07 보강) ------------------------------
       아래 요소들은 나중에 추가돼 480px 규칙이 빠져 있었다. */

    /* 헤더 메뉴: 이름이 길면 로그아웃 버튼이 밀려 나간다 */
    .auth-menu,
    .user-menu {
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-info {
        padding: 7px 14px;
    }

    .user-name,
    .logout-btn,
    .auth-link {
        font-size: 13px;
    }

    .logout-btn,
    .auth-link {
        padding: 7px 16px;
    }

    /* 승인 대기 카드: 아이콘 64px + 상하 여백 40px이 화면을 다 먹는다 */
    .pending-status-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .pending-icon {
        font-size: 44px;
        margin-bottom: 14px;
    }

    .pending-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .pending-message {
        font-size: 14px;
    }

    /* 자녀 선택: iOS가 확대하지 않도록 16px 이상을 유지한다 */
    .form-group select {
        font-size: 16px;
        padding: 14px;
        padding-right: 42px;
        background-position: right 14px center;
    }

    .form-group label {
        font-size: 15px;
        margin-bottom: 8px;
    }

    /* 빠른 조회 카드 (학부모가 가장 먼저 보는 부분) */
    .quick-status {
        padding: 14px;
        gap: 8px;
        margin-bottom: 14px;
    }

    .quick-status-icon {
        font-size: 23px;
    }

    .quick-status-label {
        font-size: 17px;
    }

    .quick-status-detail {
        font-size: 13px;
    }

    .search-hint {
        font-size: 12px;
        line-height: 1.5;
    }

    /* 조회 결과 헤더 */
    .result-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .result-header h2 {
        font-size: 17px;
    }

    .result-count {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* 좌석 상태: 배지와 좌석 설명이 둘 다 nowrap이라 가로로 삐져나간다.
       배지 아래로 내려 두 줄로 보여준다. */
    .status-detail {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        white-space: normal;
    }

    .status-badge {
        font-size: 13px;
    }

    /* 이용 기록 */
    .saved-result-note {
        font-size: 12.5px;
        padding: 10px 12px;
    }

    .usage-log-item {
        padding: 10px 12px;
    }

    .log-duration {
        display: inline-block;
        font-size: 12px;
        padding: 3px 9px;
    }
}

/* 아주 좁은 화면 (아이폰 SE, 갤럭시 폴드 커버 등) */
@media (max-width: 360px) {
    .container {
        padding: 12px;
    }

    header {
        padding: 16px 8px;
    }

    header h1 {
        font-size: 21px;
    }

    .site-title {
        font-size: 14px;
    }

    .search-card,
    #resultSection,
    .error-card,
    .loading-card {
        padding: 16px;
    }

    .quick-status-label {
        font-size: 16px;
    }

    .user-name,
    .logout-btn,
    .auth-link {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 터치 기기: hover 효과가 탭한 뒤에도 남아 카드가 들뜬 채로 보인다 */
@media (hover: none) {
    .user-card:hover,
    .usage-log-item:hover,
    .auth-link:hover,
    .logout-btn:hover,
    .search-btn:hover {
        transform: none;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
