:root {
    --primary: #274c77;
    --secondary: #6096ba;
    --primary-color: #274c77;
    --secondary-color: #6096ba;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --font-sans: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.25rem;
    --border-radius-lg: 0.3rem;
    --border-radius-sm: 0.2rem;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--dark-color);
    background: url('/theme/image/background.svg') no-repeat center center fixed;
    background-size: cover;
    background-color: #f0f3fb;
    margin-top: 70px;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.tophead {
    background: transparent;
    color: var(--primary);
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.tophead h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.tophead p {
    font-size: 1.2rem;
    opacity: 0.9;
    color: var(--secondary);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--white);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-icon.electric {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.tool-icon.weight {
    background: linear-gradient(45deg, #a18cd1, #fbc2eb);
}

.tool-icon.temp {
    background: linear-gradient(45deg, #ffc3a0, #ffafbd);
}

.tool-icon.voltage {
    background: linear-gradient(45deg, #84fab0, #8fd3f4);
}

.tool-icon.area {
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

.tool-icon.length {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

.tool-icon.data {
    background: linear-gradient(45deg, #d4fc79, #96e6a1);
}

.tool-icon.time {
    background: linear-gradient(45deg, #f6d365, #fda085);
}

.tool-icon.pressure {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.tool-icon.speed {
    background: linear-gradient(45deg, #5ee7df, #b490ca);
}

.tool-icon.volume {
    background: linear-gradient(45deg, #c471f5, #fa71cd);
}

.tool-icon.torque {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.tool-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.ad-container {
    margin: 2rem auto;
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.top-ad {
    margin-top: 0;
}

.bottom-ad {
    margin-bottom: 0;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
}

/* Modern Converter Container */
.converter-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.converter-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Input Section */
.input-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .input-section {
    grid-template-columns: 1fr 1fr;
  }
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group input, 
.input-group select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: var(--transition-fast);
  background-color: var(--light);
  font-family: var(--font-sans);
}

.input-group input:focus, 
.input-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
  background-color: var(--white);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--primary);
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 1.1em;
}

/* Results Section */
.results-section {
  margin-top: 2rem;
}

.results-section h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xl);
}

.results-section h3 i {
  color: var(--accent);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.result-card {
  background: var(--light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  border: 1px solid rgba(0,0,0,0.05);
}

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

.result-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.result-unit {
  color: var(--gray);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-single-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-single-btn:hover {
  color: var(--primary);
  background: rgba(67, 97, 238, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}


:root {
  --power-color: #4361ee;
  --power-light: #4895ef;
  --power-dark: #3f37c9;
}

/* Visualization Styles */
.visualization {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(67, 97, 238, 0.05);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.visualization::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
}

.bolt-container {
  position: relative;
  width: 120px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bolt-icon {
  font-size: 3.5rem;
  color: var(--power-color);
  position: relative;
  z-index: 2;
  animation: pulse 2s infinite;
  filter: drop-shadow(0 0 8px rgba(67, 97, 238, 0.4));
}

.energy-bar {
  position: absolute;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to top, var(--power-light), var(--power-color));
  border-radius: var(--radius-md);
  transition: height var(--transition-slow) cubic-bezier(0.68, -0.55, 0.27, 1.55);
  height: 0;
  box-shadow: 
    inset 0 -2px 4px rgba(0,0,0,0.1),
    0 2px 8px rgba(67, 97, 238, 0.3);
}

.power-indicator {
  margin-top: 1.5rem;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--power-dark);
  background: rgba(255,255,255,0.8);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-sm);
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(67, 97, 238, 0.4));
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
    filter: drop-shadow(0 0 12px rgba(67, 97, 238, 0.6));
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(67, 97, 238, 0.4));
  }
}

/* Content Section Styles */
.content-section {
  padding: 3rem 0;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.tool-description {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.tool-description h2 {
  color: #4a6bff;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.tool-description p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 1.5rem;
}

.feature-box {
  background: #f0f4ff;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  border-left: 4px solid #4a6bff;
}

.feature-box h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-box ul {
  padding-left: 1.5rem;
}

.feature-box li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* Applications Grid */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.application-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.application-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.app-icon {
  width: 50px;
  height: 50px;
  background: #4a6bff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.application-card h3 {
  color: #4a6bff;
  margin-bottom: 0.8rem;
}

.application-card p {
  color: #666;
  line-height: 1.7;
}

/* Comparison Table */
.comparison-section {
  margin: 3rem 0;
}

.comparison-section h2 {
  color: #4a6bff;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
}

.table-responsive {
  overflow-x: auto;
}

.unit-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.unit-table th {
  background: #4a6bff;
  color: white;
  padding: 1rem;
  text-align: left;
}

.unit-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  color: #555;
}

.unit-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.unit-table tr:hover {
  background-color: #f0f4ff;
}

/* Benefits Section */
.benefits-section {
  margin: 3rem 0;
}

.benefits-section h2 {
  color: #4a6bff;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.8rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  border-top: 3px solid #4a6bff;
}

.benefit-card h3 {
  color: #4a6bff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.benefit-card p {
  color: #666;
  line-height: 1.7;
}

/* FAQ Section */
.faq-section {
  margin: 3rem 0;
}

.faq-section h2 {
  color: #4a6bff;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.8rem;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  text-align: left;
  background: #f9f9f9;
  border: none;
  font-weight: 600;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #f0f4ff;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
  padding: 1rem 1.5rem 1.5rem;
  max-height: 500px;
}

.faq-answer p {
  color: #555;
  line-height: 1.8;
}

/* Pro Tips Section */
.pro-tips {
  margin: 3rem 0;
  background: #f0f4ff;
  padding: 2rem;
  border-radius: 10px;
}

.pro-tips h3 {
  color: #4a6bff;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tip-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.tip-card h4 {
  color: #4a6bff;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.tip-card p {
  color: #555;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Content Ad Styles */
.content-ad {
  margin: 2rem 0;
  padding: 1rem 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .applications-grid, .benefits-grid, .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .tool-description, .feature-box, .application-card, .benefit-card, .tip-card {
    padding: 1.2rem;
  }
  
  .tool-description h2, .comparison-section h2, .benefits-section h2, .faq-section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .unit-table th, .unit-table td {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }
}