/* ------------------------------------
 * Typecho Blog Theme - Modern Style
 * Aligned with SocienceAI WhitePaper design
 *
 * @author  SocienceAI Team
 * @update  2025-01-15
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #2c3e50;
  font-family: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 87.5%;
  line-height: 1.8;
  min-height: 100vh;
}

/* Main Container */
#body > .container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 60px 40px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:active {
  color: #2980b9;
}

pre, code {
  background: #F3F3F3;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
  border-radius: 4px;
}

code {
  padding: 2px 8px;
  color: #B94A48;
  background: #f8f9fa;
}

pre {
  padding: 15px;
  overflow: auto;
  max-height: 400px;
  border-left: 4px solid #3498db;
}

pre code {
  padding: 0;
  color: #2c3e50;
  background: none;
}

blockquote {
  margin: 1.5em 0;
  padding: 20px 25px;
  background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
  border-left: 4px solid #3498db;
  color: #495057;
  border-radius: 8px;
  font-style: italic;
}

table {
  border: 1px solid #ddd;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0;
}

table th,
table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

table th {
  background: #f8f9fa;
  color: #2c3e50;
  font-weight: 600;
}

table tr:last-child td {
  border-bottom: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Serif Pro', Georgia, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', serif;
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.3;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 10px 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  width: 100%;
  background: #f8f9fa;
  transition: all 0.3s ease;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #3498db;
  background: white;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
  padding-bottom: 1px;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */
/* Navigation handled by modern-nav in header.php */

/* ------------------
 * Main Content
 * --------------- */

.post {
  padding: 30px 0;
  margin-bottom: 30px;
  background: white;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.post:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-title {
  margin: .83em 0;
  font-size: 1.8em;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
}

.post-title a {
  color: #2c3e50;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: #3498db;
}

.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #7f8c8d;
  font-size: .92857em;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.post-meta li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: none;
}

.post-meta li::before {
  content: '•';
  margin-right: 8px;
  color: #bdc3c7;
}

.post-meta li:first-child::before {
  display: none;
}

.post-content {
  line-height: 1.8;
  color: #495057;
  font-size: 1.05em;
}

.post .tags {
  clear: both;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post .tags a {
  background: #3498db;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.3s ease;
}

.post .tags a:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.post-near {
  list-style: none;
  margin: 40px 0;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.post-near li {
  margin: 15px 0;
  padding: 10px;
  background: white;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.post-near li:hover {
  background: #f1f3f4;
  transform: translateX(5px);
}

.archive-title {
  margin: 1em 0 -1em;
  padding-top: 30px;
  color: #7f8c8d;
  font-size: 1.2em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.more {
  text-align: center;
  margin: 30px 0;
}

.more a {
  background: #3498db;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.more a:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.protected .text {
  width: 80%;
  max-width: 500px;
  margin: 0 auto;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 40px 0;
  padding: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-navigator li {
  margin: 0;
}

.page-navigator a {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 45px;
}

.page-navigator a:hover {
  background: #3498db;
  color: white;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.page-navigator .current a {
  background: #3498db;
  color: white;
  border-color: #3498db;
  font-weight: 600;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid #e9ecef;
}

.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list li {
  padding: 25px;
  margin-top: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: white;
  transition: all 0.3s ease;
}

.comment-list li:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.comment-list li.comment-level-odd {
  background: white;
}

.comment-list li.comment-level-even {
  background: #f8f9fa;
}

.comment-list li.comment-by-author {
  background: #fff3cd;
  border-color: #ffc107;
}

.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
  margin-top: 15px;
}

.comment-meta a {
  color: #7f8c8d;
  font-size: .92857em;
}

.comment-author {
  display: block;
  margin-bottom: 10px;
  color: #2c3e50;
  font-weight: 600;
}

.comment-author .avatar {
  float: left;
  margin-right: 15px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e9ecef;
}

.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
  color: #7f8c8d;
}

.respond .cancel-comment-reply:hover {
  color: #3498db;
}

#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: 600;
  color: #2c3e50;
}

#comment-form .required:after {
  content: " *";
  color: #e74c3c;
}

/* ------------------
 * Sidebar / Secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}

.widget {
  margin-bottom: 40px;
  padding: 30px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.widget:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.widget h3 {
  font-size: 1.2em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
  color: #2c3e50;
}

.widget-list {
  list-style: none;
  padding: 0;
}

.widget-list li {
  margin: 12px 0;
  line-height: 1.6;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.widget-list li:hover {
  background: #3498db;
  transform: translateX(5px);
}

.widget-list li:hover a {
  color: white;
}

.widget-list li ul {
  margin-left: 20px;
  margin-top: 10px;
}


/* ------------------
 * Footer
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: #7f8c8d;
  margin-top: 40px;
  border-top: 1px solid #e9ecef;
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.8;
  word-wrap: break-word;
  font-size: 1.05em;
}

.post-content h2, .comment-content h2 {
  font-size: 1.5em;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

.post-content h3, .comment-content h3 {
  font-size: 1.3em;
  margin: 25px 0 12px;
  color: #34495e;
}

.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;
}

.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 2px solid #3498db;
  border-width: 2px 0 0 0;
  border-radius: 2px;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
}

.alignright {
  float: right;
}

img.alignleft {
  margin: 0 20px 20px 0;
}

img.alignright {
  margin: 0 0 20px 20px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }

  #body > .container {
    margin: 20px;
    padding: 30px 20px;
  }

  .post-title {
    font-size: 1.5em;
  }

  .post-content h2, .comment-content h2 {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .post-title,
  .post-meta {
    text-align: left;
  }

  .widget {
    padding: 20px;
  }
}

@media (min-width: 992px) {
  #secondary {
    padding-left: 40px;
  }
}

@media (min-width: 1200px) {
  #body > .container {
    max-width: 952px;
  }
}


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden;
}

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/*
* Extends .sr-only class to allow element to be focusable
* when navigated to via keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
}

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden;
}
