: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;
    padding-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.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 {
  --temp-color: #f72585;
  --temp-light: #b5179e;
  --temp-dark: #7209b7;
  --temp-cold: #4cc9f0;
  --temp-cool: #4895ef;
  --temp-warm: #f8961e;
  --temp-hot: #f94144;
}

/* Visualization Styles */
.visualization {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(247, 37, 133, 0.1);
  border-radius: var(--radius-xl);
}

.thermometer-container {
  position: relative;
  width: 100px;
  height: 300px;
  margin: 0 auto;
}

.thermometer-bulb {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 90px;
  background: var(--temp-hot);
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 
    inset 0 -5px 15px rgba(0,0,0,0.1),
    0 5px 15px rgba(249, 65, 68, 0.3);
  transition: background var(--transition-normal);
}

.thermometer-tube {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 240px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #e9ecef;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.thermometer-liquid {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  background: var(--temp-hot);
  transition: all var(--transition-slow) cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.thermometer-markings {
  position: absolute;
  right: -5px;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 500;
}

.temp-indicator {
  margin-top: 1.5rem;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--primary);
  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);
}

/* Tool Specific Styles */
.converter-container.temperature {
  border-top: 5px solid var(--temp-color);
}

.converter-container.temperature .btn {
  background: var(--temp-color);
}

.converter-container.temperature .btn:hover {
  background: var(--temp-dark);
}

.converter-container.temperature .result-value {
  color: var(--temp-color);
}

.converter-container.temperature .copy-single-btn:hover {
  color: var(--temp-color);
  background: rgba(247, 37, 133, 0.1);
}

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

.content-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.content-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-card h2 i {
    color: var(--temp-color);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: rgba(255, 195, 160, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid var(--temp-color);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 1.75rem;
    color: var(--temp-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.use-case {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.use-case h3 {
    color: var(--temp-dark);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

/* Benefits List */
.benefits-list {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.benefits-list li {
    padding: 0.75rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.5;
}

.benefits-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--temp-color);
    font-weight: bold;
}

/* Tables */
.units-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.units-table th, .units-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.units-table th {
    background-color: rgba(255, 195, 160, 0.2);
    color: #2c3e50;
    font-weight: 600;
}

.units-table tr:hover td {
    background-color: rgba(255, 195, 160, 0.05);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid #eee;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.tip-number {
    position: absolute;
    top: -15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background: var(--temp-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

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

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

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

.faq-answer.show {
    padding: 1.25rem;
    max-height: 500px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .content-card {
        padding: 1.5rem;
    }
    
    .feature-grid, .use-case-grid, .benefits-list {
        grid-template-columns: 1fr;
    }
    
    .units-table th, .units-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .content-card h2 {
        font-size: 1.5rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
}