/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Root Variables */
:root {
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-light: #dee2e6;
  
  /* Accent Colors */
  --color-teal: #20c997;
  --color-coral: #ff6b6b;
  --color-yellow: #ffd93d;
  --color-purple: #a29bfe;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.15);
  
  /* Spacing */
  --gap: 20px;
  --padding-section: 40px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Typography */
h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}

h3 {
  font-size: 24px;
  font-weight: 700;
}

p {
  margin: 0;
}

.subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.text-gray {
  color: var(--text-muted);
}

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

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Cards */
.card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
  max-width: 900px;
  margin: 0 auto;
}

.card-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-description {
  font-size: 14px;
  color: var(--text-muted);
}

/* Buttons */
button, .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button:active, .btn:active {
  transform: scale(0.98);
}

/* Accent Color Buttons */
.btn-teal {
  background-color: var(--color-teal);
  color: white;
}

.btn-teal:hover {
  opacity: 0.9;
}

.btn-coral {
  background-color: var(--color-coral);
  color: white;
}

.btn-coral:hover {
  opacity: 0.9;
}

.btn-yellow {
  background-color: var(--color-yellow);
  color: var(--text-dark);
  font-weight: 700;
}

.btn-yellow:hover {
  opacity: 0.9;
}

.btn-purple {
  background-color: var(--color-purple);
  color: white;
}

.btn-purple:hover {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid currentColor;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

.card-link {
  position: relative;
  display: block;
  cursor: pointer;
  border: 2px solid;
}

/* Inputs & Textareas */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-teal);
}

textarea {
  resize: vertical;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* Radio & Checkboxes */
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  margin-right: 8px;
}

label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

thead {
  background-color: var(--bg-light);
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-light);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.5);
}

tbody tr:nth-child(even) {
  background-color: var(--bg-light);
}

tbody tr:hover {
  background-color: rgba(32, 201, 151, 0.05);
}

/* Code & Pre */
pre {
  background-color: var(--bg-light);
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

code {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* Diff Styles */
.diff-add {
  background-color: #d4edda;
  color: #155724;
}

.diff-remove {
  background-color: #f8d7da;
  color: #721c24;
}

.diff-unchanged {
  color: var(--text-muted);
}

/* Navigation */
.nav-dropdown {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.nav-trigger {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
  margin-top: 8px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-menu.active {
  display: flex;
}

.dropdown-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-weight: 500;
}

.dropdown-item:hover {
  background-color: var(--bg-light);
}

/* Music Player */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  z-index: 999;
  max-width: 250px;
}

.music-player-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.music-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.2s ease;
}

.music-btn:hover {
  opacity: 0.7;
}

.music-volume {
  flex: 1;
}

.music-volume input[type="range"] {
  width: 100%;
  height: 4px;
}

.music-unmute-tooltip {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Page Layout */
.page-layout {
  min-height: 100vh;
  padding: 40px 20px 120px 20px;
  padding-top: 60px;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

/* Two-Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Tool Section */
.tool-section {
  max-width: 800px;
  margin: 0 auto;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-group input,
.input-group select {
  flex: 1;
}

/* Mobile Responsive */
@media (max-width: 767px) {
  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 16px;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .card {
    padding: 24px;
  }

  .page-layout {
    padding: 30px 16px 120px 16px;
    padding-top: 50px;
  }

  .music-player {
    bottom: 10px;
    right: 10px;
    max-width: 200px;
  }

  .nav-dropdown {
    top: 10px;
    right: 10px;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="file"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* Utility Classes */
.mt-20 {
  margin-top: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.gap-20 {
  gap: 20px;
}

.gap-10 {
  gap: 10px;
}

.flex {
  display: flex;
}

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

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.w-full {
  width: 100%;
}

.hidden {
  display: none;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
