/* blog/assets/css/blog-style.css */
/* Premium Dark-Themed Glassmorphism Design System for Tech Animation Blog */

:root {
  --font-primary: 'Outfit', 'Noto Sans JP', sans-serif;
  --bg-base: #030712;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-surface-elevated: rgba(31, 41, 55, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.15);
  
  --primary: #00f0ff; /* Neon Cyan */
  --primary-glow: rgba(0, 240, 255, 0.35);
  --secondary: #a855f7; /* Electric Purple */
  --secondary-glow: rgba(168, 85, 247, 0.35);
  
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --grad-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --grad-dark: linear-gradient(180deg, #030712, #0b0f19);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--primary-glow);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 240, 255, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(11, 15, 25, 0.5) 0px, transparent 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-smooth);
}
a:hover {
  color: #66f5ff;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-weight: 300;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-smooth);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: var(--grad-primary);
  color: #030712 !important;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Layout */
.main-layout {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

section {
  min-width: 0;
}

aside.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Hero (Home Page) */
.hero {
  margin-bottom: 2.5rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(0, 240, 255, 0.05) 100%);
  border: 1px solid rgba(0, 240, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Search Container */
.search-container {
  margin-bottom: 2.5rem;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  height: 50px;
  padding: 0 1rem 0 3.2rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

.btn-search {
  height: 50px;
  padding: 0 2rem;
  background: var(--grad-primary);
  color: #030712;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Glassmorphism Card styling */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 15px 1px var(--primary-glow);
  transform: translateY(-3px);
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-fallback-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(0, 240, 255, 0.1) 100%);
}

.post-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background-color: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-card-title a {
  color: var(--text-primary);
  transition: color var(--transition-smooth);
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

/* Post Details */
.post-detail-header {
  margin-bottom: 2rem;
}

.post-detail-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.post-detail-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.post-detail-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Animation Container styling */
.animation-container-full {
  width: 100%;
  height: 800px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.animation-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-nav {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-smooth);
}

.btn-nav:hover {
  background-color: rgba(0, 240, 255, 0.08);
  border-color: var(--primary);
  transform: translateX(-3px);
}

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.category-list, .recent-post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-item-link, .recent-post-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  transition: all var(--transition-smooth);
}

.category-item-link:hover, .recent-post-link:hover,
.category-item-link.active {
  color: var(--primary);
}

.category-count {
  font-size: 0.8rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  color: var(--text-muted);
}

.recent-post-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.recent-post-title {
  font-weight: 500;
  line-height: 1.4;
}

.recent-post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-posts-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background-color: rgba(3, 7, 18, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  transition: color var(--transition-smooth);
}

.footer-link:hover {
  color: var(--primary);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 2rem 1.25rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 1.25rem;
  }
  
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }
  
  nav {
    width: 100%;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .nav-link, .nav-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    text-align: center;
  }
  
  .hero {
    padding: 1.5rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .search-form {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-search {
    width: 100%;
  }
  
  .post-detail-title {
    font-size: 1.75rem;
  }
  
  .post-detail-description {
    font-size: 1rem;
  }
  
  .animation-container-full {
    height: 80vh;
    height: 80dvh;
    border-radius: var(--radius-md);
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.25rem;
  }
  
  .post-detail-title {
    font-size: 1.4rem;
  }
  
  .animation-container-full {
    height: 80vh;
    height: 80dvh;
  }
  
  .glass-card {
    padding: 1.25rem;
  }
}

/* Fullscreen Overlay and Card Zoom Transitions */
.animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-base);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.animation-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1001;
}

.overlay-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overlay-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background-color: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

#overlay-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.overlay-btn {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.overlay-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-2px);
}

.overlay-btn.btn-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.overlay-body {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: calc(100% - 70px);
  background-color: #000;
}

.overlay-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Morphing transition element */
.zoom-transition-element {
  position: fixed;
  z-index: 1005;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(0, 240, 255, 0.15) 100%);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-md);
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
  overflow: hidden;
}

/* Fullscreen maximize styles for post.php animation container */
.animation-container-full {
  position: relative;
}

.maximize-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--primary);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.maximize-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.4s ease;
}

.maximize-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-2px) scale(1.03);
}

.maximize-btn:hover svg {
  transform: scale(1.15);
}

/* Fullscreen active state for animation container in post.php */
.animation-container-full.maximized {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  z-index: 9999;
  border-radius: 0;
  border: none;
  margin: 0;
  background-color: #000;
}

.animation-container-full.maximized .maximize-btn {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.animation-container-full.maximized .maximize-btn:hover {
  background: #ef4444;
  border-color: #ff6b6b;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
  transform: translateY(-2px) scale(1.03);
}

.animation-container-full.maximized .maximize-btn:hover svg {
  transform: rotate(-90deg) scale(1.1);
}

/* Responsive headers for overlay */
@media (max-width: 768px) {
  .overlay-header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .overlay-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .overlay-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}
