/*
Theme Name: Eternity
Theme URI: https://example.com/eternity
Author: Vaimibao
Author URI: https://example.com
Description: A modern WordPress theme with gradient backgrounds and card-based layout.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: modern, responsive, gradient, card, dark-mode
Text Domain: eternity
*/

:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --bg-color: #f5f5f5;
  --text-color: #333;
  --card-bg: #fff;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #f5f5f5;
    --card-bg: #2d2d2d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.notification-bar {
  background: #f8f9fa;
  padding: 6px 0;
  border-bottom: 1px solid #e9ecef;
}

.notification-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  color: #6c757d;
}

.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

.logo img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.nav {
  display: flex;
  gap: 15px;
}

.nav a {
  color: white;
  text-decoration: none;
  font-size: 0.8rem;
  transition: opacity 0.3s ease;
}

.nav a:hover {
  opacity: 0.8;
}

.search {
  position: relative;
}

.search input {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 15px;
  padding: 6px 12px;
  color: white;
  width: 160px;
  font-size: 0.8rem;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search button {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.main {
  padding: 20px 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 15px;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.post-content {
  padding: 12px;
}

.post-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.7rem;
  margin-bottom: 8px;
}

.post-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-title a {
  color: var(--text-color);
  text-decoration: none;
}

.post-meta {
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  color: #888;
  gap: 8px;
  margin-top: 8px;
}

.post-meta .author {
  display: flex;
  align-items: center;
  gap: 5px;
}

.author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-widget {
  margin-bottom: 30px;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.footer {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 30px 0;
  margin-top: 50px;
}

.footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-widget h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Single Post Styles */
.single-post {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.post-header {
  margin-bottom: 20px;
}

.post-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.back-btn:hover {
  color: var(--primary-color);
}

.post-actions {
  display: flex;
  gap: 12px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 4px;
  border-radius: 50%;
}

.post-action-btn:hover {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
}

.post-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-header .post-meta {
  margin-top: 0;
  flex-wrap: wrap;
  font-size: 0.7rem;
}

.author-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.6rem;
  margin-left: 4px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 20px 0;
}

.author-box {
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius);
}

.author-box h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-details {
  flex: 1;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.author-stats {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: #888;
}

.author-stats i {
  margin-right: 2px;
}

.author-actions {
  display: flex;
  gap: 8px;
}

.follow-btn, .message-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 15px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.follow-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.message-btn {
  background: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
}

.message-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius);
}

.prev-post, .next-post {
  flex: 1;
}

.prev-post {
  text-align: left;
}

.next-post {
  text-align: right;
}

.prev-post a, .next-post a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.prev-post a:hover, .next-post a:hover {
  color: var(--primary-color);
}

.comments-section {
  margin-top: 30px;
}

.comments-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.comment-form {
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: var(--border-radius);
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  resize: vertical;
  min-height: 80px;
  background: var(--card-bg);
  color: var(--text-color);
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.comment-form button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

.comment-form button:hover {
  opacity: 0.8;
}

.comment-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.comment-tabs button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 0;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.comment-tabs button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.comment-tabs button:hover {
  color: var(--text-color);
}

.comment {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-author-info {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-meta {
  font-size: 0.7rem;
  color: #888;
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 50px;
}

.comment-actions {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: #888;
  padding-left: 50px;
}

.comment-actions a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.comment-actions a:hover {
  color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .single-post {
    padding: 20px;
  }
  
  .post-header h1 {
    font-size: 1.5rem;
  }
  
  .author-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Loading Animations */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .comment-form textarea {
    border-color: #444;
  }
  
  .author-box,
  .post-actions,
  .comment {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .sidebar-widget h3 {
    border-bottom-color: #444;
  }
}