/* Modern CSS for Artistic Style documentation */

:root {
  --primary-color: #4169e1; /* RoyalBlue */
  --hover-color: #6495ed; /* CornflowerBlue */
  --accent-color: #fffdda; /* Light yellow for code blocks */
  --text-color: #333;
  --light-text: #fff;
  --heading-color: var(--primary-color);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: white;
  margin: 0;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5 {
  color: var(--heading-color);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  font-style: italic;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.3em;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1rem;
  text-transform: uppercase;
}

p {
  margin-bottom: 1.2em;
  line-height: 1.6;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

a.contents:link, a.contents:visited {
  color: var(--primary-color);
  text-decoration: none;
}

a.contents:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

/* Code blocks */
pre {
  color: var(--primary-color);
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--accent-color);
  padding: 1.2em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border: none;
}

/* Back to top button */
#topBtn {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: var(--light-text);
  cursor: pointer;
  padding: 0.8rem;
  border-radius: 50%;
  font-size: 1rem;
  opacity: 0.8;
  transition: background-color 0.3s, opacity 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#topBtn:hover {
  background-color: var(--hover-color);
  opacity: 1;
}

/* Slogan */
#slogan {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 200;
  position: fixed;
  bottom: 3rem;
  right: 1rem;
  z-index: 98;
  color: var(--primary-color);
  font-size: 2.5rem;
  opacity: 0.4;
  transition: opacity 0.3s;
}

#slogan:hover {
  opacity: 0.8;
}

/* Navigation Menu */
.menu ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 2rem 0;
  gap: 0.5rem;
}

.menu ul li {
  position: relative;
}

.menu ul li a {
  text-decoration: none;
  display: block;
  padding: 1rem 1.5rem;
  background: var(--primary-color);
  color: var(--light-text);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 180px;
  text-align: center;
}

.menu ul li a:hover,
.menu ul li a:focus,
.menu ul li a:active {
  background: var(--hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Submenu styling */
.menu ul ul {
  position: absolute;
  left: 0;
  opacity: 0;
  visibility: hidden;
  margin: 0;
  flex-direction: column;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 100;
  background: var(--primary-color);
}

.menu ul li:hover ul {
  opacity: 1;
  visibility: visible;
}

.menu ul ul li {
  width: 100%;
  margin-bottom: 0;
}

.menu ul ul li a {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 0;
  background: var(--primary-color);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

.menu ul ul li a:hover {
  background: var(--hover-color);
  transform: none;
}

.menu-arrow {
  font-size: 0.7rem;
  margin-left: 0.3rem;
}

/* Responsive button for mobile menu */
.responsive-button {
  padding: 1rem;
  color: var(--light-text);
  background: var(--primary-color);
  border-radius: 4px;
  text-align: center;
  display: none;
  cursor: pointer;
  font-weight: 600;
  margin: 1rem 0;
}

input[id=responsive-button] {
  display: none;
}

input[id=responsive-button]:checked ~ .menu {
  display: block;
}

/* Responsive styles */
@media screen and (max-width: 900px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  #slogan {
    font-size: 1.8rem;
    bottom: 2rem;
    right: 1rem;
  }
}

@media screen and (max-width: 780px) {
  .responsive-button {
    display: block;
  }

  .menu {
    display: none;
  }

  .menu ul {
    flex-direction: column;
    width: 100%;
  }

  .menu ul li {
    width: 100%;
    margin-bottom: 2px;
  }

  .menu ul li a {
    width: 100%;
    text-align: left;
    border-radius: 2px;
  }

  .menu ul ul {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    margin-left: 1rem;
    width: calc(100% - 1rem);
  }

  .menu ul li:hover ul {
    display: block;
  }

  #slogan {
    font-size: 1.5rem;
    opacity: 0.4;
  }

  #topBtn {
    bottom: 1rem;
    right: 1rem;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 0.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  pre {
    padding: 1rem;
  }

  #slogan {
    display: none;
  }
}

/* Tables */
.responsive-table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.responsive-table td,
.responsive-table th {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.responsive-table td img {
  vertical-align: middle;
}

@media screen and (max-width: 600px) {
  .responsive-table {
    display: block;
    overflow-x: auto;
  }
}

/* Release notes specific styles */
.release-notes .release {
  margin-bottom: 2.5rem;
}

.release-notes .release:last-child {
  border-bottom: none;
}

.release-notes .release h3 {
  background-color: var(--primary-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.release-notes .release ul {
  list-style-type: square;
}

.release-notes .release li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.release-notes .release li a {
  word-break: break-word;
}

.archive-link {
  margin: 2rem 0;
  padding: 1rem;
  background-color: rgba(0,0,0,0.05);
  border-radius: 4px;
  text-align: center;
}

/* Main content and sections */
main {
  max-width: 100%;
}

.intro {
  margin: 2rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.content article {
  margin-bottom: 2rem;
}

.sourceforge-logo {
  text-align: center;
  margin: 2rem 0;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}
