/* styles.css */

/* Theming variables */
:root {
  --bg: #111;
  --text: white;
  --button-bg: #c39eff;
  --button-hover: #dcc7ff;
  --sidebar-bg: #1c1c1c;
  --header-bg: #2b2b2b;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.light {
  --bg: #f8f8ff;
  --text: #111;
  --button-bg: #8b5cf6;
  --button-hover: #a78bfa;
  --sidebar-bg: #eeeeee;
  --header-bg: #dddddd;
}

header {
  background-color: var(--header-bg);
  padding: 1rem;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: background-color 0.4s ease;
}

a:link {
  color: #dcc7ff;
}

a:visited {
  color: #c39eff;
}

.back-button {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.back-button:hover {
  transform: translateY(-50%) scale(1.1);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
}

header p {
  margin: 0;
  font-size: 0.9rem;
  color: #ccc;
}

.container {
  display: flex;
}

.sidebar {
  background-color: var(--sidebar-bg);
  width: 260px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  transition: background-color 0.4s ease;
}

.logo-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
}

.logo {
  width: 100%;
  transition: transform 0.3s ease;
  display: block;
}

.logo-bg {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 110%;
  height: 120%;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  transform: rotate(6deg);
  z-index: -1;
  transition: all 0.3s ease;
  opacity: 0;
}

.logo-wrapper:hover .logo {
  transform: scale(1.05) rotate(4deg);
}

.logo-wrapper:hover .logo-bg {
  opacity: 1;
  transform: rotate(3deg);
}

.menu {
  margin-top: 1rem;
}

.menu p {
  margin: 0.5rem 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu p:hover {
  transform: scale(1.05);
}

.footer {
  font-size: 0.7rem;
  color: #bbb;
  text-align: left;
}

.footer a {
  color: #bbb;
  text-decoration: none;
  transition: transform 0.2s ease;
  display: inline-block;
}

.footer a:hover {
  transform: scale(1.05);
  color: var(--text);
}

/* Toggle link style */
#theme-toggle {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  display: inline-block;
  color: inherit;
}

main {
  margin-left: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.content {
  text-align: center;
  max-width: 600px;
  font-weight: 500;
}

img.expandable {
  max-width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

img.expandable:hover {
  transform: scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
}

#resolution-warning, #mobile-warning {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 320px;
  padding: 15px 20px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
}

#resolution-warning.show, #mobile-warning.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#resolution-warning button, #mobile-warning button {
  margin-top: 10px;
  background-color: #721c24;
  border: none;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Page loader */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s ease;
}

#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Spinner animation */
.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  animation: fadePulse 1.2s ease-in-out infinite;
}

@keyframes fadePulse {
  0% { background: white; transform: scale(1); }
  50% { background: #c39eff; transform: scale(1.2); }
  100% { background: white; transform: scale(1); }
}

button {
  all: unset;
  background-color: var(--button-bg);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: var(--button-hover);
  transform: scale(1.05);
}