/* style.css - Modern Dark Theme for Itzy.io */

:root {
  /* Color Palette - Deep Navy & Cyan/Blue */
  --bg-body: #0a192f;
  --bg-card: #112240;
  --bg-card-hover: #1d3356;

  --text-primary: #ccd6f6;
  --text-secondary: #8892b0;
  --text-accent: #64ffda;

  --primary-color: #64ffda;
  /* Teal/Cyan accent */
  --secondary-color: #007bff;
  /* Keeping a bit of the original blue identity */

  --border-color: #233554;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Bungee', cursive;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px -10px rgba(2, 12, 27, 0.7);

  --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* Utility Classes */
.hide {
  display: none !important;
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

/* Layout Structure */
.main-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background-color: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-accent);
}

.header-logo img {
  height: 40px;
  width: auto;
}

.user-status {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.user-status span {
  color: var(--primary-color);
  font-weight: bold;
}

/* Main Grid Layout for Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-top: 40px;
}

/* Sidebar Navigation */
.sidebar {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  height: fit-content;
  box-shadow: var(--shadow-md);
}

.sidebar-header {
  color: var(--text-accent);
  font-family: var(--font-display);
  margin-bottom: 15px;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

ul.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.menu li {
  margin-bottom: 5px;
}

ul.menu a {
  display: block;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
}

ul.menu a:hover,
ul.menu a.active {
  background-color: rgba(100, 255, 218, 0.1);
  color: var(--primary-color);
}

/* Main Content Area */
.main-area {
  background-color: transparent;
}

/* Hero Section (Home) */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

/* Import Luckiest Guy for the thicker playful title */
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

.hero-title {
  font-family: var(--font-display);
  /* font-family: 'Luckiest Guy', cursive; */
  font-weight: 900;
  font-size: 6rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  letter-spacing: 3px;
  text-shadow:
    4px 4px 0px #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  /* Cartoon outline effect */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Bouncy transition */
  cursor: default;
}

.hero-title:hover {
  transform: scale(1.05) rotate(-2deg);
  /* Slight bounce and tilt on hover */
  color: var(--text-accent);
  /* Change color on hover */
}

.minecraft-splash {
  position: absolute;
  bottom: 10px;
  /* Adjusted positioning */
  right: -80px;
  /* Adjusted positioning */
  font-size: 1.2rem;
  /* Kept similar but looks smaller relative to the huge title */
  color: #ffff55;
  /* Minecraft yellow */
  font-family: 'Bungee', cursive;
  /* Or a pixel font if available, but Bungee works */
  transform: rotate(-20deg);
  animation: splash-pulse 0.5s infinite alternate;
  text-shadow: 2px 2px 0px #3f3f3f;
  white-space: normal;
  /* Allow wrapping */
  max-width: 200px;
  /* Force wrapping for long text */
  text-align: center;
  /* Center the wrapped text */
  line-height: 1.2;
  /* Better spacing for multiple lines */
  z-index: 10;
}

@keyframes splash-pulse {
  0% {
    transform: rotate(-20deg) scale(1);
  }

  100% {
    transform: rotate(-20deg) scale(1.1);
  }
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* Input Forms */
.url-input-container {
  width: 100%;
  max-width: 800px;
  position: relative;
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  padding: 10px;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
}

.input-main {
  flex: 1;
  background: transparent;
  border: none;
  padding: 15px 25px;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
}

.btn-main {
  background-color: var(--primary-color);
  color: var(--bg-body);
  border: none;
  padding: 15px 35px;
  border-radius: 40px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-main:hover {
  background-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

/* Custom Hash Section */
.custom-hash-section {
  margin-top: 20px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-input-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  width: 100%;
  max-width: 400px;
  transition: var(--transition);
}

.custom-input-wrapper.hide {
  display: none;
  opacity: 0;
}

.custom-input-wrapper input {
  background: transparent;
  border: none;
  color: var(--text-accent);
  width: 100%;
  outline: none;
  font-family: monospace;
  font-size: 1.1rem;
}

/* Result Display */
.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 30px;
  border: 1px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  animation: fadeIn 0.5s ease;
}

.short-url-text {
  font-size: 1.5rem;
  color: var(--text-accent);
  font-weight: bold;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 15px 20px;
  }

  .input-group {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 20px;
  }

  .btn-main {
    width: 100%;
  }

  .result-card {
    flex-direction: column;
    text-align: center;
  }
}

/* Slide Divs (TOS/Privacy) */
.slide-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 600px;
  height: 100%;
  background-color: var(--bg-card);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.slide-panel.active {
  right: 0;
}

.slide-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
}

.slide-content {
  padding: 0 1.2rem 0 1.2rem;
}

.close-btn {
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--primary-color);
}

/* Auth Pages (Login/Signup) */
.auth-container {
  max-width: 400px;
  margin: 40px auto;
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.page-header {
  font-family: var(--font-display);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.input-form {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(10, 25, 47, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.input-form:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.1);
}

.btn-block {
  width: 100%;
  margin-top: 10px;
}

.signup-request {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.match {
  border-color: #2f962f !important;
}

.no-match {
  border-color: #ff6b6b !important;
}

.signup-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#username-status,
#email-status {
  font-size: 0.8rem;
  margin-top: 5px;
  font-style: italic;
}

/* Analytics Styles */
.analytics-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.browserName,
.osName,
.regionName,
.cityName,
.countryName {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.browserName:hover,
.osName:hover,
.regionName:hover,
.cityName:hover,
.countryName:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.percentBar {
  height: 6px;
  margin-top: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.accordion {
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.accordion-label {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: block;
}

.accordion-label:hover {
  color: var(--primary-color);
}

.accordion .content {
  display: none;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
}

#accordion-browser:checked~.content,
#accordion-os:checked~.content {
  display: block;
}

.info-box {
  background-color: rgba(100, 255, 218, 0.1);
  border: 1px solid var(--primary-color);
  padding: 15px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-box strong {
  color: var(--text-accent);
}

.info-box a {
  text-decoration: underline;
}