* {
	text-align:center;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	flex-direction:column;
	font-family: Arial, sans-serif;
  background: #20B2AA;
  color: #000;
  transition: background-color 0.45s ease, color 0.3s ease;
  padding: 40px 20px;
  box-sizing: border-box;
}

hr {
  width: 50%;
  margin: 20px auto;
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
}

.divider {
  width: 80%;
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  opacity: 1;
}

h1 {
	font-size:36px;
  font-weight:bolder;
  text-transform: uppercase;
  letter-spacing: 1.2px;
	color: #222;
}

p {
	margin-bottom:40px;
	margin-top:40px;
	font-size:30px;
	color: #1a1a1a;
	font-weight:bold;
}

button {
	font-size: 20px;
	margin: 0 auto;
	width: 120px;
	height: 60px;
	padding: 14px;
	border-radius: 15px;
	border: none;
	cursor: pointer;
	background-color: #FB9B4B;
	transition: transform 0.45s;
}

button:hover {
	cursor:pointer;
	background: #333;
	color: #FB9B4B;
	transform: scale(1.05);
	transition: all 0.2s ease;
}

#quote {
  padding: 20px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  display: inline-block;
}

#quote span.author {
  display: block;
  margin-top: 10px;
  font-style: italic;
  color: rgba(0, 0, 0, 0.55);
  font-size:0.85em;
}

#copybtn {
  margin: 8px;
  width: 80px;
  height: 45px;
  font-size: 16px;
}

#copybtn:last-of-type {
  background-color: #6A5ACD;
  color: white;
}




/* Container for positioning (top right corner) */
.toggle-container {
  position: absolute;
  top: 30px;
  right: 30px;
}

/* Hide default checkbox */
#modeToggle {
  display: none;
}

/* Background track */
.toggle-label {
  display: block;
  width: 80px;
  height: 40px;
  background: #333;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

/* Sliding ball */
.toggle-ball {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 34px;
  height: 34px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

/* When toggled (checked) */
#modeToggle:checked + .toggle-label {
  background: #ccc;
}

#modeToggle:checked + .toggle-label .toggle-ball {
  transform: translateX(38px);
  background: #222;
  color: yellow; 
  content: "🌞";
}





/* Dark mode general styles */
.dark-mode {
  background: #121212; /* default background when toggled */
  color: #f0f0f0;
}

.dark-mode h1 {
  color: #e0e0e0;
}

.dark-mode #quote {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ddd;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.dark-mode #quote span.author {
  color: #bbb;
}

.dark-mode button {
  background-color: #2c2c2c;
  color: #f0f0f0;
  border: 1px solid #555;
}

.dark-mode button:hover {
  background: #444;
  color: #fff;
}


.fade {
  animation: fadeIn 0.7s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px); /* optional: slight upward motion */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CATEGORIES SECTION */

/* Divider and title */

.category-title {
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #333;
  letter-spacing: 1px;
}

.dark-mode .category-title {
  color: #e0e0e0;
}

/* Category buttons container */
.category-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
  margin-bottom: 60px;
}

/* Category button styles */
.cat-btn {
  background-color: #E0E0E0; /* default neutral grey */
  color: #333;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cat-btn:hover {
  background-color: #49B587; /* your main vibrant color */
  color: #fff;
  transform: translateY(-3px);
}

/* Active (selected) category */
.cat-btn.active {
  background-color: #FFD700;
  color: #222;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

/* Adjust category buttons in dark mode */
body.dark-mode .cat-btn {
  background-color: #333; /* darker neutral */
  color: #ddd; /* softer text */
  box-shadow: 0 3px 6px rgba(255, 255, 255, 0.1);
}

body.dark-mode .cat-btn:hover {
  background-color: #49B587; /* still vibrant */
  color: #fff;
  box-shadow: 0 4px 10px rgba(73, 181, 135, 0.4);
}

body.dark-mode .cat-btn.active {
  background-color: #FFD700; /* gold stays same */
  color: #111; /* strong contrast */
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}


/* AI QUOTE GENERATOR SECTION */

.ai-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.ai-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#clear-btn {
  display: none;
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #aaa;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s ease;
}

#clear-btn:hover {
  background: #888;
  transform: none;
}

body.dark-mode #clear-btn {
  background: #666;
}

body.dark-mode #clear-btn:hover {
  background: #888;
}

#ai-input {
  width: 300px;
  padding: 12px 40px 12px 18px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  border: 2px solid #ccc;
  border-radius: 30px;
  outline: none;
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

#ai-input:focus {
  border-color: #49B587;
  box-shadow: 0 0 8px rgba(73, 181, 135, 0.4);
}

#ai-btn {
  width: auto;
  height: auto;
  padding: 12px 24px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  border-radius: 30px;
  background-color: #6A5ACD;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

#ai-btn:hover {
  background-color: #4B3DB5;
  color: #fff;
  transform: translateY(-2px);
}

#ai-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

body.dark-mode #ai-input {
  background: #2a2a2a;
  color: #f0f0f0;
  border-color: #555;
}

body.dark-mode #ai-input::placeholder {
  color: #888;
}

body.dark-mode #ai-input:focus {
  border-color: #49B587;
}

body.dark-mode #ai-btn {
  background-color: #6A5ACD;
  color: #fff;
}