:root {
  --background-body: #fff6fb;
  --background-card: #ffffff;
  --text-main: #6a4e77;
  --text-secondary: #8a6f96;
  --primary-color: #c78dd3;
  --secondary-color: #94c2f3;
  --accent-color: #ff9dbd;
  --border-color: #ffd6e6;
  --box-shadow: 0 5px 15px rgba(229, 158, 255, 0.15);
  --font-family-heading: 'Pacifico', cursive;
  --font-family-main: 'M PLUS Rounded 1c', sans-serif;
  --font-family-accent: 'Caveat', cursive;
  --font-family-body: 'Quicksand', sans-serif;
  --border-radius: 20px;
  --border-radius-small: 10px;
}

:root.theme-dark {
  --background-body: #231942;
  --background-card: #352960;
  --text-main: #f4e9ff;
  --text-secondary: #c9acf5;
  --primary-color: #b77ade;
  --secondary-color: #7e8df5;
  --accent-color: #ff89a9;
  --border-color: #4a3273;
  --box-shadow: 0 5px 15px rgba(88, 34, 160, 0.3);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
}

@supports (scrollbar-gutter: stable) {
  html {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background-body);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--background-body);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 25% 10%, rgba(255, 214, 255, 0.2) 2%, transparent 12%), 
    radial-gradient(circle at 75% 30%, rgba(193, 226, 255, 0.2) 2%, transparent 12%),
    radial-gradient(circle at 50% 60%, rgba(255, 178, 217, 0.2) 2%, transparent 10%);
  background-size: 100px 100px;
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
  color: var(--primary-color);
}

h1 {
  font-size: 3em;
  margin: 0 0 0.8em 0;
  text-shadow: 3px 3px 0px var(--secondary-color);
}

h2 {
  margin: 1.6em 0 0.5em 0;
  font-size: 1.8em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.4em;
}

h5 {
  font-size: 1.3em;
}

h6 {
  font-size: 1.2em;
}

p,
ul,
ol {
  font-family: var(--font-family-body);
  font-size: 1.2rem;
  line-height: 1.75em;
  margin: 1.2em 0;
}

ol,
ul {
  padding-left: 2rem;
  -webkit-padding-start: 5%;
  -webkit-padding-end: 5%;
}

li {
  margin: 0.8rem 0;
}

li p {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
}

a:hover {
  color: var(--accent-color);
  transform: scale(1.02);
}

p a {
  text-decoration: none;
  box-shadow: inset 0 -0.12em 0 var(--primary-color);
  transition: all 0.2s ease-in-out;
  padding: 0 0.2em;
  border-radius: 4px;
}

p a:hover {
  color: white;
  box-shadow: inset 0 -1.5em 0 var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-small);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

hr {
  padding: 0;
  border: 0;
  height: 10px;
  margin: 40px auto;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='20' height='10'  viewBox='0 0 20 10' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-miterlimit='10'%3e%3cpath fill='none' d='M0 0h20v10H0z'/%3e%3cclipPath id='a'%3e%3cpath d='M0 0h20v10H0z'/%3e%3c/clipPath%3e%3cg clip-path='url(%23a)'%3e%3cpath d='M20 7.384c-4.999-.001-5-4.768-9.999-4.768C5 2.616 5 7.384 0 7.384' fill='none' stroke-width='3' stroke='%23c78dd3'/%3e%3c/g%3e%3c/svg%3e");
  opacity: 0.8;
}

button, .button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8em 1.6em;
  font-family: var(--font-family-body);
  font-weight: 700;
  font-size: 1em;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:hover, .button:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card {
  background-color: var(--background-card);
  border-radius: var(--border-radius);
  padding: 1.5em;
  margin: 1em 0;
  box-shadow: var(--box-shadow);
  border: 2px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(229, 158, 255, 0.25);
}

/* Animation classes */
.floating {
  animation: float 4s ease-in-out infinite;
}

.sparkle {
  position: relative;
}

.sparkle::before,
.sparkle::after {
  content: "✦";
  position: absolute;
  color: var(--accent-color);
  opacity: 0.7;
  animation: sparkle 2s ease-in-out infinite;
}

.sparkle::before {
  top: -10px;
  left: -10px;
  font-size: 1.5em;
}

.sparkle::after {
  bottom: -10px;
  right: -10px;
  font-size: 1.5em;
  animation-delay: 1s;
}

/* Layout classes */
.container {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  padding: 0 2em;
}

.content {
  padding: 2em 0;
}

.content h1 {
  font-size: 3em;
  margin: 1em 0;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.33em 0.67em;
  padding-top: 8px;
  margin-left: 10px;
  gap: 0.6em;
  border-radius: 99em;
  background-color: var(--background-card);
  border: 2px solid var(--border-color);
}

.theme-toggle > label:focus-within {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 0.08em var(--primary-color), 0 0 0 0.12em white;
}

.theme-toggle > label {
  color: var(--text-secondary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  cursor: pointer;
}

.theme-toggle .checked {
  color: var(--primary-color);
  opacity: 1;
}

input[name='theme-toggle'] {
  position: absolute;
  opacity: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
}

@media (max-width: 1020px) {
  h1 {
    font-size: 2.5em;
  }

  .content h1 {
    font-size: 2.5em;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2em;
  }
  
  .card {
    padding: 1.2em;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  p,
  ul,
  ol {
    font-size: 1.1rem;
  }
  
  h1 {
    font-size: 2em;
  }
  
  .content h1 {
    font-size: 2em;
  }
} 