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

:root {
  --primary: #165DFF;
  --primary-hover: #0d47b5;
  --bg-light: #ffffff;
  --bg-dark: #1a1a2e;
  --card-light: #f8fafc;
  --card-dark: #252542;
  --text-light: #1e293b;
  --text-dark: #f1f5f9;
  --text-muted-light: #64748b;
  --text-muted-dark: #94a3b8;
  --border-light: #e2e8f0;
  --border-dark: #334155;
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-dark: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-card-hover-light: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-card-hover-dark: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  padding: 12px 0;
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #0a1628 0%, #0d1b2a 100%);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark header {
  background: linear-gradient(135deg, #0a1628 0%, #0d1b2a 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo::before {
  content: 'R';
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(22, 93, 255, 0.5);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

body.dark .theme-toggle {
  border-color: var(--border-dark);
}

.theme-toggle:hover {
  background-color: rgba(22, 93, 255, 0.1);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.dropdown-btn:hover {
  background-color: rgba(22, 93, 255, 0.1);
}

.dropdown {
  position: relative;
}

.dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 16px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  min-width: 320px;
  max-width: 400px;
  width: calc(100vw - 40px);
  box-shadow: var(--shadow-card-hover-light);
  z-index: 1000;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

body.dark .dropdown-content {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-card-hover-dark);
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: grid;
}

.dropdown-section {
  display: flex;
  flex-direction: column;
}

.dropdown-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 12px;
}

.dropdown-section a {
  text-decoration: none;
  color: var(--text-muted-light);
  font-size: 0.875rem;
  padding: 6px 0;
  transition: color 0.2s;
}

body.dark .dropdown-section a {
  color: var(--text-muted-dark);
}

.dropdown-section a:hover {
  color: var(--primary);
}

/* Main Content */
main {
  padding: 65px 0 60px;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-description {
  color: var(--text-muted-light);
  margin-bottom: 40px;
}

body.dark .page-description {
  color: var(--text-muted-dark);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background-color: var(--card-light);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

body.dark .card {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover-light);
  border-color: var(--primary);
}

body.dark .card:hover {
  box-shadow: var(--shadow-card-hover-dark);
  border-color: var(--primary);
}

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

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-description {
  color: var(--text-muted-light);
  font-size: 0.875rem;
}

body.dark .card-description {
  color: var(--text-muted-dark);
}

/* Tool Container */
.tool-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--card-light);
  color: inherit;
  transition: border-color 0.2s;
}

body.dark .form-input, body.dark .form-select, body.dark .form-textarea {
  border-color: var(--border-dark);
  background-color: var(--card-dark);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-check label {
  font-weight: 400;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}

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

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

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-light);
  color: inherit;
}

body.dark .btn-secondary {
  border-color: var(--border-dark);
}

.btn-secondary:hover {
  background-color: rgba(22, 93, 255, 0.1);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/* Result Display */
.result-container {
  background-color: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  min-height: 100px;
  word-break: break-all;
  white-space: pre-wrap;
}

body.dark .result-container {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

.result-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

body.dark .result-item {
  border-bottom-color: var(--border-dark);
}

.result-item:last-child {
  border-bottom: none;
}

/* Copy Toast */
.copy-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.copy-toast.visible {
  opacity: 1;
}

/* Footer */
footer {
  background-color: #1a1a2e;
  color: #f1f5f9;
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  color: #f1f5f9;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #165DFF;
}

.footer-section p {
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-contact {
  font-family: 'Courier New', monospace;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copyright {
  color: #64748b;
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #94a3b8;
  transition: all 0.2s;
}

.footer-social a:hover {
  background-color: #165DFF;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
/* Hero Section */
.hero-section {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

body.dark .hero-section h1 {
  color: #f1f5f9;
}

body.dark .hero-section p {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 30px 16px;
    margin-bottom: 20px;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
}
