/* Modern Design Enhancements for DriftTengoku phpBB Theme */

/* Basic Reset and Variables */
* {
  box-sizing: border-box;
}

/* CSS Variables */
:root {
  --primary-color: #7b2d8e;
  --primary-hover: #9b4dae;
  --primary-light: rgba(123, 45, 142, 0.1);
  --secondary-color: #e5e5e5;
  --accent-color: #ff6b35;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --background: #f8f9fa;
  --card-background: #ffffff;
  --border-color: #dee2e6;
  --border-light: #f1f3f4;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 8px 30px rgba(123, 45, 142, 0.2);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Typography Improvements */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333333;
  background: #e5e5e5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.forum-title,
.topic-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.forum-title::after,
.topic-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Modern Card Design */
.forumbg,
.forabg,
.post,
.panel {
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  overflow: hidden;
}

.forumbg:hover,
.forabg:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Header Improvements */
.headerbar {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #dddddd;
}

.site-description h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #7b2d8e;
  margin-bottom: 0.5rem;
}

/* Navigation Enhancements */
.navbar {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  border: 1px solid #dddddd;
}

.nav-main li a {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #333333;
}

.nav-main li a:hover {
  background: rgba(123, 45, 142, 0.1);
  color: #7b2d8e;
  transform: translateY(-1px);
}

/* Button Modernization */
.button,
.button1,
.button2 {
  background: linear-gradient(135deg, #7b2d8e, #9b4dae);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(123, 45, 142, 0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.button::before,
.button1::before,
.button2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.button:hover::before,
.button1:hover::before,
.button2:hover::before {
  left: 100%;
}

.button:hover,
.button1:hover,
.button2:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 45, 142, 0.4);
}

.button-secondary {
  background: #ffffff;
  color: #7b2d8e;
  border: 2px solid #7b2d8e;
}

.button-secondary:hover {
  background: #7b2d8e;
  color: white;
}

/* Topic List Improvements */
.topiclist li.row {
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
}

.topiclist li.row:hover {
  border-left-color: #7b2d8e;
  background: rgba(123, 45, 142, 0.05);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topiclist .topictitle {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333333;
  transition: color 0.3s ease;
}

.topiclist .topictitle:hover {
  color: #7b2d8e;
}

/* Post Styling */
.post {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #7b2d8e, #9b4dae);
}

.postprofile {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-right: 1px solid #eeeeee;
  padding: 1.5rem;
}

.postprofile .avatar {
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.postprofile .avatar:hover {
  transform: scale(1.05);
}

.postbody {
  padding: 1.5rem;
}

.post-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.post-buttons .button {
  padding: 0.5rem;
  min-width: auto;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search Box Enhancement */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #dddddd;
  border-radius: 25px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: #7b2d8e;
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.1);
}

.search-box .inputbox {
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  flex: 1;
  outline: none;
}

.search-box .button {
  border-radius: 0;
  margin: 0;
  padding: 0.75rem 1rem;
}

/* Statistics Block */
.stat-block {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #dddddd;
}

.stat-block h3 {
  color: #7b2d8e;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-block h3::before {
  content: "";
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #7b2d8e, #9b4dae);
  border-radius: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #7b2d8e;
}

.stat-label {
  font-size: 0.9rem;
  color: #666666;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0;
}

.pagination .button {
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.pagination .active {
  background: #7b2d8e;
  color: white;
}

/* Form Improvements */
.inputbox,
textarea,
select {
  border: 2px solid #dddddd;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #ffffff;
}

.inputbox:focus,
textarea:focus,
select:focus {
  border-color: #7b2d8e;
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.1);
  outline: none;
}

/* Dropdown Enhancements */
.dropdown {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #dddddd;
  overflow: hidden;
}

.dropdown-contents li a {
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dropdown-contents li a:hover {
  background: rgba(123, 45, 142, 0.1);
  color: #7b2d8e;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  :root {
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 12px;
  }

  .forum-title,
  .topic-title {
    font-size: 1.5rem;
  }

  .headerbar {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .post-buttons {
    justify-content: center;
  }

  .topiclist li.row:hover {
    transform: none;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .search-box {
    border-radius: 6px;
  }
}

/* Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7b2d8e, #9b4dae);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9b4dae, #bb6dce);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators */
*:focus {
  outline: 2px solid #7b2d8e;
  outline-offset: 2px;
}

button:focus,
.button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.3);
}
