/* * =========================================
 * CSS Design System (Pastel Theme)
 * =========================================
 */
:root {
    /* Palette: Warm Pastel Tones */
    --primary-color: #FFB7B2;    /* Soft Salmon Pink */
    --primary-dark: #FF9E99;
    --secondary-color: #B5EAD7;  /* Pastel Mint */
    --accent-color: #FFDAC1;     /* Peach */
    --text-dark: #4A4A4A;        /* Dark Grey for readability */
    --text-light: #7D7D7D;
    --white: #FFFFFF;
    --bg-color: #FFF9F5;         /* Very light warm background */
    
    /* Social Colors */
    --naver-green: #03C75A;
    --kakao-yellow: #FEE500;
    --google-gray: #FFFFFF;

    /* Spacing & Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(255, 183, 178, 0.25);
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Mobile Container Constraint */
#app-shell {
    width: 100%;
    max-width: 480px; /* Mobile width constraint */
    background-color: var(--white);
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* * Header (App Bar) */
.app-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center; /* 타이틀 중앙 정렬 */
    padding: 0 20px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.app-bar h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* 로그아웃 버튼 스타일 */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    
    /* 우측 상단 절대 배치 */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.icon-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-dark);
}

/* * Main Container */
#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* * View: Home (Landing) */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 40px;
    height: 100%;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    font-size: 3rem;
    box-shadow: var(--shadow-md);
}

.main-copy {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.4;
    word-break: keep-all;
}

.sub-copy {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 48px;
    word-break: keep-all;
}

.login-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-login {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.1s, box-shadow 0.2s, background-color 0.2s;
}

.btn-login:active {
    transform: scale(0.98);
}

/* Disabled State for Login Buttons */
.btn-login:disabled, .btn-login.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(20%);
}

.btn-login span {
    position: absolute;
    left: 20px;
    font-weight: 900;
}

.naver {
    background-color: var(--naver-green);
    color: white;
}

.kakao {
    background-color: var(--kakao-yellow);
    color: #3C1E1E;
}

.google {
    background-color: var(--google-gray);
    color: var(--text-dark);
    border: 1px solid #E0E0E0;
}
.google span.material-icons-round {
    font-weight: normal;
    font-size: 1.2rem;
}

/* * View: Dashboard (After Login) */
.dashboard-header {
    margin-bottom: 24px;
}

.welcome-text {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid #F0F0F0;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 14px;
    border: 1px solid #EEE;
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: #FAFAFA;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary-color);
    background-color: white;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 183, 178, 0.4);
}

/* * Kids List & Cards */
.kids-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.kid-card {
    background-color: white;
    border: 2px solid #EEE;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.kid-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.kid-card:active {
    transform: scale(0.98);
}

.kid-avatar {
    width: 48px;
    height: 48px;
    background-color: var(--secondary-color);
    color: #388E3C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.kid-info {
    flex: 1;
}

.kid-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.kid-birth {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* * Training View Styles */
.training-tabs {
    display: flex;
    background: white;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border: none;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
    gap: 6px;
}

.tab-item span.material-icons-round {
    font-size: 24px;
    margin-bottom: 2px;
}

.tab-item span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
}

.tab-item.active {
    background-color: #FFF0F0;
    color: var(--primary-dark);
}

.tab-item.active span.material-icons-round {
    color: var(--primary-color);
}

/* Status Bar */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--secondary-color);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.status-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-avatar {
    width: 36px;
    height: 36px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.status-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #388E3C;
    line-height: 1.2;
}

.status-birth {
    font-size: 0.8rem;
    color: #555;
}

.btn-small-outline {
    background: transparent;
    border: 1px solid #388E3C;
    color: #388E3C;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(255,255,255,0.4);
}

.training-content {
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

/* * Loading UI Components */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.loading-message {
    margin-top: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility */
.hidden { display: none !important; }