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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
  color: #e0e0e0;
}

/* SPLASH SCREEN */
#splashScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOutSplash 0.5s ease-in 3s forwards;
}

#splashText {
  font-size: 5rem;
  color: white;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  animation: splashPulse 1s ease-in-out infinite;
  font-weight: bold;
  letter-spacing: 2px;
}

@keyframes fadeOutSplash {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes splashPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* MAIN LAYOUT */
.container {
  display: flex;
  min-height: 100vh;
  animation: fadeInApp 0.5s ease-in 3.5s forwards;
  opacity: 0;
}

@keyframes fadeInApp {
  to {
    opacity: 1;
  }
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: rgba(26, 26, 46, 0.95);
  border-right: 3px solid #667eea;
  padding: 25px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
}

.sidebar h2 {
  color: #667eea;
  margin-bottom: 25px;
  font-size: 1.6rem;
  font-weight: bold;
}

.nav-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 10px;
  background: rgba(15, 15, 30, 0.5);
  border: 1.5px solid #333;
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-btn:hover {
  background: rgba(42, 42, 62, 0.7);
  border-color: #667eea;
  transform: translateX(5px);
}

.nav-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  padding: 35px 40px;
  overflow-y: auto;
}

.tool-page {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tool-page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 2px solid #667eea;
  padding-bottom: 15px;
  font-weight: bold;
}

.form-section {
  background: rgba(26, 26, 46, 0.7);
  border: 1.5px solid #667eea;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.1);
}

.form-section:hover {
  border-color: #764ba2;
  box-shadow: 0 0 25px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

label {
  color: #adb5ff;
  font-weight: 600;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  background: rgba(15, 15, 30, 0.8);
  border: 1.5px solid #444;
  color: #e0e0e0;
  padding: 13px 15px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.96rem;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.3), inset 0 0 10px rgba(102, 126, 234, 0.1);
  background: rgba(15, 15, 30, 0.95);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-weight: 500;
}

button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(-1px);
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.output-box {
  background: rgba(15, 15, 30, 0.9);
  border: 2px solid #667eea;
  border-radius: 10px;
  padding: 18px;
  margin-top: 18px;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.98rem;
  max-height: 350px;
  overflow-y: auto;
  position: relative;
  white-space: pre-wrap;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.15);
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 14px;
  font-size: 0.8rem;
  background: #667eea;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  width: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.copy-btn:hover {
  background: #764ba2;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.color-btn {
  padding: 12px;
  background: rgba(42, 42, 62, 0.6);
  border: 2px solid #555;
  color: #e0e0e0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  text-align: center;
  font-weight: 600;
}

.color-btn:hover {
  border-color: #667eea;
  background: rgba(42, 42, 62, 0.8);
}

.color-btn.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.checkbox-group {
  display: flex;
  gap: 18px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-item input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

.preview-box {
  background: rgba(15, 15, 30, 0.8);
  border: 2px solid #667eea;
  border-radius: 10px;
  padding: 18px;
  margin-top: 18px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  word-break: break-all;
  font-weight: 500;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.info-box {
  background: rgba(102, 126, 234, 0.15);
  border-left: 4px solid #667eea;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.info-box strong {
  color: #adb5ff;
}

.section-title {
  color: #667eea;
  margin: 20px 0 15px 0;
  font-size: 1.25rem;
  font-weight: bold;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 3px solid #667eea;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 10px;
  }

  .sidebar h2 {
    display: none;
  }

  .nav-btn {
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .main-content {
    padding: 20px;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .color-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}
