﻿/* 
  EverydayFun Theme - Warm & Cozy 
  Designed for comfort and simplicity
*/

:root {
  /* Color Palette */
  --bg-base: #F9F7F5;       /* Warm beige base */
  --bg-surface: #FFFFFF;     /* Clean white surface */
  
  --primary: #FF8E72;       /* Soft Coral */
  --primary-hover: #FF7A5C;
  --primary-light: #FFF0EC; /* Very light coral for backgrounds */
  
  --secondary: #74B4A0;     /* Sage Green */
  --secondary-hover: #5E9E8A;
  --secondary-light: #E8F6F2;
  
  --accent: #A29BFE;        /* Soft Lavender */
  
  --text-main: #4A4A4A;     /* Soft Black for headings */
  --text-body: #6D6D6D;     /* Dark Gray for body */
  --text-muted: #9E9E9E;    /* Light Gray for placeholders */
  
  --border: #EAEAEA;        /* Subtle border */
  --line: #E0E0E0;
  
  --error: #FF6B6B;
  --success: #51CF66;

  /* Spacing & Shapes */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
  
  --font-main: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* Layout Containers */
.app-container {
  width: 100%;
  max-width: 600px; /* Mobile-first focused width */
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-surface);
  box-shadow: 0 0 40px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

@media (min-width: 601px) {
  .app-container {
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .app-container {
    max-width: 1200px; /* PC 화면 너비 확장 */
  }
}

main {
  flex: 1;
  padding: 24px;
}

/* Header Styles */
header.hero {
  background-color: var(--primary-light);
  padding: 40px 24px 32px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end; /* 하단 정렬 */
  }
}

.hero-text h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-text p {
  font-size: 16px;
  color: var(--text-body);
  margin: 0;
}

.hero-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-item {
  background: rgba(255, 255, 255, 0.4);
  padding: 6px 10px;
  border-radius: 20px; /* 둥근 캡슐 모양 */
  display: flex;
  flex-direction: row; /* 가로 배치 */
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(0,0,0,0.05);
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0;
}

.metric-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

/* Sub-page Header */
.sub-header {
  padding: 4px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.sub-header h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.back-button {
  color: var(--text-main);
  padding: 8px;
  margin-left: -8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.back-button:hover {
  background-color: var(--bg-base);
}

.header-spacer {
  width: 40px; /* Balance for back button */
}

.header-right {
  min-width: 80px;
  text-align: right;
}

/* Content Lists & Cards */
.section-header {
  margin-bottom: 16px;
}

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

.section-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.content-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 반응형 그리드 */
}

.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.content-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.content-card p {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 16px;
  line-height: 1.5;
}

.content-card button {
  margin-top: auto;
  padding: 12px 24px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

.content-card:hover button {
  background-color: var(--primary);
  color: #fff;
}

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

.content-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.content-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.category-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 16px;
  background: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* Forms */
.form-card {
  background: var(--bg-base);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.form-group {
  margin-bottom: 24px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

input[type="date"],
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-color: #fff;
  font-size: 16px;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  font-family: var(--font-main);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  width: 100%;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(255, 142, 114, 0.3);
}

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

.btn-primary:active {
  transform: translateY(1px);
}

/* Result Cards */
.result-card {
  margin-top: 24px;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--border);
  animation: slideUp 0.4s ease-out;
}

.result-card h2 {
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 12px;
}

.result-card p {
  margin-bottom: 12px;
}

.btn-secondary {
  flex: 1 1 0;
  text-align: center;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-text {
  color: var(--text-muted);
  text-decoration: underline;
  font-size: 14px;
}

.hidden { display: none !important; }

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-footer {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: auto;
}


