:root {
  --bg: #f5f5f7;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0,0,0,0.06);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --sidebar-width: 260px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.today-page { display: flex; min-height: 100vh; }
.today-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex; flex-direction: column;
  padding: 24px 0;
}
.sidebar-header { padding: 0 24px 20px; }
.sidebar-title { font-size: 28px; font-weight: 800; letter-spacing: -0.8px; }
.sidebar-date { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.nav-item:hover { background: rgba(0,0,0,0.03); color: var(--text); }
.nav-item.active { background: rgba(0,113,227,0.08); color: var(--accent); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }
.sidebar-footer { padding: 16px 24px 0; border-top: 1px solid var(--border); margin-top: auto; }
.admin-link { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500; }
.admin-link:hover { color: var(--text); }

.today-main {
  margin-left: var(--sidebar-width); flex: 1;
  min-height: 100vh; padding: 0 40px 40px;
  max-width: calc(100% - var(--sidebar-width));
}

/* ===== HERO SPLIT ===== */
.hero-split {
  display: grid; grid-template-columns: 1.55fr 1fr;
  gap: 20px; padding-top: 24px; margin-bottom: 8px; min-height: 480px;
}
.hero-left {
  position: relative; border-radius: var(--radius);
  overflow: hidden; background: var(--card-bg);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.hero-carousel { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.hero-slide-item {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1; text-decoration: none; color: inherit; display: block;
}
.hero-slide-item.active { opacity: 1; z-index: 2; }
.hero-slide-image { position: absolute; inset: 0; overflow: hidden; }
.hero-slide-image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.hero-slide-item.active .hero-slide-image img { transform: scale(1); }
.hero-slide-gradient { position: absolute; bottom: 0; left: 0; right: 0; height: 70%; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); }
.hero-slide-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; color: white; }
.hero-slide-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0; margin-bottom: 6px; display: block; transform: translateY(12px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s; }
.hero-slide-item.active .hero-slide-tag { opacity: 0.85; transform: translateY(0); }
.hero-slide-title { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px; line-height: 1.25; opacity: 0; transform: translateY(16px); transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.25s; }
.hero-slide-item.active .hero-slide-title { opacity: 1; transform: translateY(0); }
.hero-slide-desc { font-size: 13px; opacity: 0; line-height: 1.5; margin-bottom: 14px; transform: translateY(16px); transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.35s; }
.hero-slide-item.active .hero-slide-desc { opacity: 0.8; transform: translateY(0); }
.hero-carousel-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.hero-carousel-dot { width: 6px; height: 6px; border-radius: 50%; border: none; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.4s; padding: 0; }
.hero-carousel-dot.active { background: white; width: 18px; border-radius: 3px; }

.hero-right { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; }
.hero-right-header { margin-bottom: 16px; }
.hero-right-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 4px; }
.hero-right-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.hero-right-list { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.hero-right-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); transition: all 0.2s; text-decoration: none; color: inherit; }
.hero-right-item:last-child { border-bottom: none; }
.hero-right-item:hover { transform: translateX(3px); }
.hero-right-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 6px rgba(0,0,0,0.08); flex-shrink: 0; }
.hero-right-info { flex: 1; min-width: 0; }
.hero-right-name { font-size: 14px; font-weight: 600; color: var(--text); }
.hero-right-desc { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-right-btn { background: rgba(0,113,227,0.08); color: var(--accent); border: none; padding: 5px 14px; border-radius: 980px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.hero-right-btn:hover { background: var(--accent); color: white; }

/* ===== SECTIONS ===== */
.content-section { margin-bottom: 32px; }
.section-header-bar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; padding-top: 16px; }
.section-main-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.section-sub { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.see-all-link { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 500; }
.see-all-link:hover { text-decoration: underline; }

/* ===== MASONRY ===== */
.masonry-row { display: flex; flex-direction: column; gap: 16px; }
.masonry-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.masonry-pair.left-large { grid-template-columns: 1.6fr 1fr; }
.masonry-pair.right-large { grid-template-columns: 1fr 1.6fr; }
.masonry-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s ease; cursor: pointer; position: relative; text-decoration: none; color: inherit; display: block; }
.masonry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.masonry-wide .masonry-image-wrap, .masonry-narrow .masonry-image-wrap { height: 260px; }
.masonry-image-wrap { position: relative; overflow: hidden; }
.masonry-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.masonry-card:hover .masonry-image-wrap img { transform: scale(1.03); }
.masonry-gradient { position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 50%, transparent 100%); pointer-events: none; }
.masonry-body { padding: 16px 18px 18px; position: relative; }
.masonry-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); margin-bottom: 6px; }
.masonry-title { font-weight: 700; margin-bottom: 6px; line-height: 1.3; letter-spacing: -0.2px; color: var(--text); font-size: 17px; }
.masonry-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.masonry-app { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.masonry-app-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.masonry-app-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.masonry-btn { background: rgba(0,113,227,0.08); color: var(--accent); border: none; padding: 5px 14px; border-radius: 980px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.masonry-btn:hover { background: var(--accent); color: white; }

/* ===== GRID 3COL ===== */
.grid-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-card { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow); transition: all 0.2s; cursor: pointer; text-decoration: none; color: inherit; }
.grid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.grid-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.08); flex-shrink: 0; }
.grid-info { flex: 1; min-width: 0; }
.grid-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-btn { background: rgba(0,113,227,0.08); color: var(--accent); border: none; padding: 5px 14px; border-radius: 980px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.grid-btn:hover { background: var(--accent); color: white; }

/* ===== LIST ===== */
.list-wrap { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 14px; background: var(--card-bg); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); transition: all 0.2s; text-decoration: none; color: inherit; }
.list-item:hover { transform: translateX(3px); }
.list-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.08); flex-shrink: 0; }
.list-info { flex: 1; min-width: 0; }
.list-name { font-size: 15px; font-weight: 600; color: var(--text); }
.list-desc { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.list-btn { background: rgba(0,113,227,0.08); color: var(--accent); border: none; padding: 5px 16px; border-radius: 980px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.list-btn:hover { background: var(--accent); color: white; }

/* ===== SEARCH ===== */
.search-form { display: flex; align-items: center; gap: 10px; background: white; border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); max-width: 500px; margin-bottom: 24px; }
.search-form input { border: none; background: transparent; outline: none; font-size: 15px; width: 100%; font-family: inherit; }

/* ===== ARTICLE DETAIL ===== */
.article-detail { margin-bottom: 32px; }
.article-hero { position: relative; height: 400px; border-radius: var(--radius); overflow: hidden; background-size: cover; background-position: center; margin-bottom: 32px; }
.article-hero-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%); }
.article-hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px; color: white; }
.article-tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; margin-bottom: 8px; display: block; }
.article-title { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 8px; }
.article-meta { font-size: 14px; opacity: 0.8; }
.article-body { background: white; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); font-size: 16px; line-height: 1.8; }
.article-body h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; }
.article-body p { margin-bottom: 16px; }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); }

/* ===== APP DETAIL ===== */
.app-detail { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-bottom: 32px; }
.app-detail-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.app-detail-icon { width: 80px; height: 80px; border-radius: 20px; object-fit: cover; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.app-detail-info { flex: 1; }
.app-detail-name { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.app-detail-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.app-detail-meta { display: flex; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.app-detail-btn { background: var(--accent); color: white; border: none; padding: 10px 28px; border-radius: 980px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.app-detail-btn:hover { background: var(--accent-hover); }
.app-detail-screenshot { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.app-detail-screenshot img { width: 100%; height: auto; }
.app-detail-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.app-detail-section p { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }

/* ===== FOOTER ===== */
.main-footer { text-align: center; padding: 40px 0 20px; color: var(--text-secondary); font-size: 13px; border-top: 1px solid var(--border); margin-top: 20px; }

/* ===== EMPTY ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; color: var(--text); }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: rgba(29,29,31,0.95); color: white; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(20px); } }

/* ===== ADMIN ===== */
.admin-body { background: var(--bg); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: #1d1d1f; color: white; padding: 24px 0; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; }
.admin-logo { font-size: 20px; font-weight: 800; padding: 0 24px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px; }
.admin-menu { list-style: none; }
.admin-menu li { padding: 0; }
.admin-menu li a { padding: 12px 24px; display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: 0.7; color: white; text-decoration: none; transition: all 0.2s; }
.admin-menu li:hover a, .admin-menu li.active a { opacity: 1; background: rgba(255,255,255,0.08); }
.admin-menu svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-main { margin-left: 260px; flex: 1; padding: 32px; background: var(--bg); min-height: 100vh; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.admin-title { font-size: 28px; font-weight: 700; }
.admin-btn { background: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: 980px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.stat-change { font-size: 13px; margin-top: 4px; font-weight: 600; color: #34c759; }
.data-table { width: 100%; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 20px; text-align: left; font-size: 14px; }
.data-table th { background: rgba(0,0,0,0.02); font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr { border-bottom: 1px solid var(--border); }
.table-actions { display: flex; gap: 8px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; text-decoration: none; }
.icon-btn.edit { background: rgba(0,113,227,0.1); color: var(--accent); }
.icon-btn.delete { background: rgba(255,59,48,0.1); color: #ff3b30; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; transition: all 0.2s; background: white; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.form-textarea { min-height: 80px; resize: vertical; }
.btn-secondary { background: rgba(0,0,0,0.05); color: var(--text); border: none; padding: 10px 20px; border-radius: 980px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--accent); color: white; border: none; padding: 10px 24px; border-radius: 980px; font-size: 14px; font-weight: 600; cursor: pointer; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%); }
.login-card { background: white; padding: 48px; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 90%; max-width: 400px; text-align: center; }
.login-logo { font-size: 32px; font-weight: 800; margin-bottom: 8px; background: linear-gradient(135deg, #1d1d1f, #434344); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }
.login-form .form-group { text-align: left; margin-bottom: 16px; }
.login-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 12px; border-radius: 980px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .today-sidebar { display: none; }
  .today-main { margin-left: 0; max-width: 100%; padding: 0 20px 40px; }
  .hero-split { grid-template-columns: 1fr; }
  .grid-3col { grid-template-columns: repeat(2, 1fr); }
  .masonry-pair.left-large, .masonry-pair.right-large { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-3col { grid-template-columns: 1fr; }
  .masonry-pair { grid-template-columns: 1fr !important; }
  .article-hero { height: 280px; }
  .article-title { font-size: 24px; }
  .app-detail-header { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}