/* ============================================
   황칠 개인 복용 추적 시스템 - 스타일
   © 2002년 통합수행원 無盡藏[무진장] 전문상담연구소
   ============================================ */

/* ===== 개인 프로필 관리 ===== */
.profile-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    margin-bottom: 30px;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.profile-info {
    flex: 1;
    margin-left: 20px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-details {
    font-size: 0.95rem;
    opacity: 0.9;
}

.profile-edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.profile-edit-btn:hover {
    background: white;
    color: #667eea;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===== 복용 기록 입력 ===== */
.intake-input-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.intake-input-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.intake-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.intake-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.intake-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ===== 복용 기록 차트 ===== */
.chart-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.chart-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

.chart-period-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.period-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.period-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.period-btn:hover {
    border-color: #667eea;
}

/* ===== 복용 달력 ===== */
.calendar-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav-btn {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.calendar-nav-btn:hover {
    background: #667eea;
    color: white;
}

.calendar-month {
    font-size: 1.3rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    padding: 10px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.calendar-day:hover {
    background: #f8f8f8;
    border-color: #667eea;
}

.calendar-day.inactive {
    color: #ccc;
    cursor: default;
}

.calendar-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.calendar-day.has-record {
    background: #e7f3ff;
    border-color: #667eea;
}

.calendar-day-number {
    font-size: 1rem;
}

.calendar-day-dose {
    font-size: 0.7rem;
    color: #667eea;
    margin-top: 2px;
}

/* ===== 효과 체크리스트 ===== */
.effect-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.effect-checklist {
    display: grid;
    gap: 15px;
}

.effect-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.effect-item:hover {
    background: #e7f3ff;
}

.effect-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    cursor: pointer;
}

.effect-info {
    flex: 1;
}

.effect-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.effect-description {
    font-size: 0.85rem;
    color: #666;
}

.effect-rating {
    display: flex;
    gap: 5px;
}

.star-btn {
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s;
}

.star-btn.active {
    color: #ffd700;
}

/* ===== 기록 리스트 ===== */
.records-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.record-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.record-date {
    width: 120px;
    font-weight: 600;
    color: #667eea;
}

.record-details {
    flex: 1;
    display: flex;
    gap: 20px;
}

.record-detail-item {
    display: flex;
    flex-direction: column;
}

.record-detail-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 3px;
}

.record-detail-value {
    font-size: 1.05rem;
    font-weight: 600;
}

.record-actions {
    display: flex;
    gap: 10px;
}

.record-action-btn {
    padding: 8px 15px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.record-action-btn:hover {
    background: #f0f0f0;
}

/* ===== 데이터 내보내기 ===== */
.export-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.export-btn {
    padding: 15px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.export-btn:hover {
    border-color: #667eea;
    background: #f8f8ff;
}

.export-icon {
    font-size: 2rem;
}

.export-label {
    font-weight: 600;
}

/* ===== 알림 설정 ===== */
.reminder-section {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.reminder-time {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
}

.reminder-toggle {
    width: 50px;
    height: 28px;
    background: #ccc;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.reminder-toggle.active {
    background: #667eea;
}

.reminder-toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.reminder-toggle.active::after {
    transform: translateX(22px);
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .intake-form {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        font-size: 0.85rem;
    }
    
    .record-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .record-date {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .record-details {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .export-section {
        grid-template-columns: 1fr;
    }
}

/* ===== 토스트 알림 ===== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-size: 1rem;
    font-weight: 500;
}

.toast-notification.success {
    border-left: 4px solid #4caf50;
}

.toast-notification.error {
    border-left: 4px solid #f44336;
}

.toast-notification.info {
    border-left: 4px solid #2196f3;
}

/* ===== 로딩 오버레이 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid #e8e8e8;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}