/* ============================================= */
/* 🎨 전체 색상 설정 (여기서 색상을 한번에 바꿀 수 있어요!) */
/* ============================================= */
:root {
    --bg-color: #7ea9e9;
    /* ✏️ 배경 색상 */
    --card-bg: rgba(255, 255, 255, 0.75);
    /* ✏️ 카드 배경 색상 (투명도 포함) */
    --text-primary: #1d1d1f;
    /* ✏️ 주요 글자 색상 (이름 등) */
    --text-secondary: #86868b;
    /* ✏️ 보조 글자 색상 (학번, 동아리 등) */
    --accent: #0066cc;
    /* ✏️ 강조 색상 (학과 이름, 로고 등) */
    --border: rgba(255, 255, 255, 0.6);
    /* 카드 테두리 색상 */
    --shadow: rgba(0, 0, 0, 0.08);
    /* 카드 그림자 색상 */
}

/* 기본 초기화 - 건드리지 않아도 됩니다 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================= */
/* 📌 페이지 전체 배경 설정 */
/* ============================================= */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.05) 0, transparent 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* 3D 효과를 위한 컨테이너 - 건드리지 않아도 됩니다 */
.card-container {
    perspective: 1000px;
    padding: 20px;
}

/* ============================================= */
/* 📌 카드 전체 모양 설정 */
/* ============================================= */
.card {
    width: 340px;
    /* ✏️ 카드 가로 크기 (숫자를 키우면 카드가 넓어져요) */
    height: 545px;
    /* ✏️ 카드 세로 크기 (숫자를 키우면 카드가 길어져요) */
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    /* ✏️ 카드 모서리 둥글기 (숫자가 클수록 둥글어요) */
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 1);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
}

/* ============================================= */
/* 📌 카드 상단 (학교 로고 + 학생증 표시) */
/* ============================================= */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    transform: translateZ(20px);
}

/* 학교 로고 영역 */
.school-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    /* ✏️ 학교 이름 글자 크기 */
    color: var(--text-primary);
}

.school-logo svg {
    color: var(--accent);
    /* 로고 아이콘 색상 (위의 --accent 색상을 따라갑니다) */
}

/* "학생증" 뱃지 */
.card-type {
    font-size: 17px;
    /* ✏️ 뱃지 글자 크기 */
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

/* 카드 본문 영역 - 건드리지 않아도 됩니다 */
.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateZ(30px);
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ============================================= */
/* 📌 프로필 사진 영역 */
/* ============================================= */
.profile-img-container {
    position: relative;
    width: 120px;
    /* ✏️ 프로필 사진 크기 (width와 height를 같은 값으로!) */
    height: 120px;
    /* ✏️ 프로필 사진 크기 */
    border-radius: 50%;
    padding: 4px;
    /* ✏️ 프로필 사진 테두리 그라데이션 색상 (#0066cc → #5ac8fa) */
    background: linear-gradient(135deg, #0066cc, #5ac8fa);
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.2);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

/* ============================================= */
/* 📌 상태 표시 (프로필 오른쪽 아래 초록 원) */
/* ============================================= */
.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    /* ✏️ 상태 표시 원 크기 */
    height: 24px;
    /* ✏️ 상태 표시 원 크기 */
    background-color: #34c759;
    /* ✏️ 상태 표시 색상 (초록 = 온라인, 빨강 = 오프라인 등) */
    border-radius: 50%;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.4);
    animation: pulse 2s infinite;
    /* ✏️ 깜빡이는 속도 (2s = 2초마다 반복) */
}

/* 상태 표시 깜빡이는 애니메이션 - 건드리지 않아도 됩니다 */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(52, 199, 89, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
    }
}

/* ============================================= */
/* 📌 개인정보 표시 영역 */
/* ============================================= */
.info-section {
    text-align: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ✏️ 이름 스타일 */
.name {
    font-size: 28px;
    /* ✏️ 이름 글자 크기 */
    font-weight: 700;
    /* ✏️ 이름 글자 굵기 (100~900, 클수록 굵어요) */
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

/* ✏️ 학과 스타일 */
.department {
    font-size: 20px;
    /* ✏️ 학과 글자 크기 */
    font-weight: 600;
    color: var(--accent);
    /* 학과 글자 색상 (위의 --accent 색상을 따라갑니다) */
    margin-bottom: 8px;
}

/* ✏️ 학번 & 동아리 스타일 */
.student-id,
.club {
    font-size: 15px;
    /* ✏️ 학번/동아리 글자 크기 */
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

/* ============================================= */
/* 📌 카드 하단 (바코드 영역) */
/* ============================================= */
.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: center;
    transform: translateZ(20px);
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.barcode {
    width: 100%;
    display: flex;
    justify-content: center;
}

.barcode svg {
    max-width: 100%;
    height: auto;
}