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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav {
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

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

.converter-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: #333;
}

.input-group, .output-group {
    margin-bottom: 1.5rem;
}

.input-group label, .output-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.input-group input, .output-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .output-group input:focus {
    outline: none;
    border-color: #667eea;
}

.output-group input {
    background-color: #f8fafc;
    color: #667eea;
    font-weight: 600;
}

.convert-button {
    margin: 2rem 0;
    text-align: center;
}

#convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.conversion-info {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.conversion-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Formula Section */
.formula-section {
    padding: 4rem 0;
    background: white;
}

.formula-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

.formula-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.formula-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.formula-display {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.formula-display p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

.formula-card ul {
    list-style: none;
    margin-top: 1rem;
}

.formula-card li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.formula-card li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

/* Examples Section */
.examples-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.examples-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.example-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.example-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.conversion {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

.faq-item {
    background: #f8fafc;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.faq-item h3 {
    background: #667eea;
    color: white;
    padding: 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-item h3:hover {
    background: #5a67d8;
}

.faq-item p {
    padding: 1.5rem;
    margin: 0;
    line-height: 1.6;
}

/* Related Tools Section */
.related-tools {
    padding: 4rem 0;
    background: #f8fafc;
}

.related-tools h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tool-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tool-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .formula-content {
        grid-template-columns: 1fr;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .formula-section, .examples-section, .faq-section, .related-tools {
        padding: 2rem 0;
    }
}

/* Animation for smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus, input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success animation */
.success {
    animation: successPulse 0.5s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
} 

/* Converter Header */
.converter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.converter-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Conversion Toggle */
.conversion-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.toggle-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.toggle-btn:hover:not(.active) {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.toggle-text {
    font-weight: 500;
}

.direction-arrow {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.direction-arrow:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.arrow-text {
    font-weight: 600;
}

/* Converter Actions */
.converter-actions {
    margin: 1.5rem 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.action-text {
    font-weight: 500;
}

.copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.clear-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.clear-icon {
    font-size: 1rem;
}

.clear-text {
    font-weight: 500;
}



/* Conversion Table Styles */
.conversion-table-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.conversion-table-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 200px;
}

.search-box button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.table-info {
    color: #64748b;
    font-size: 0.9rem;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.conversion-table {
    width: 100%;
    border-collapse: collapse;
}

.conversion-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.conversion-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.conversion-table tbody tr:hover {
    background: #f1f5f9;
}

.conversion-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.conversion-table tbody tr:nth-child(even):hover {
    background: #e2e8f0;
}

.table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.page-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-info {
    font-weight: 600;
    color: #64748b;
}

/* Responsive Design for Table */
@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        justify-content: center;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    
    .conversion-table {
        font-size: 0.9rem;
    }
    
    .conversion-table th,
    .conversion-table td {
        padding: 0.5rem 0.25rem;
    }
}

@media (max-width: 480px) {
    .conversion-table {
        font-size: 0.8rem;
    }
    
    .conversion-table th,
    .conversion-table td {
        padding: 0.25rem 0.1rem;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
} 

/* Converter Vertical Layout */
.converter-input-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-label {
    min-width: 3.5em;
    color: #64748b;
    font-weight: 500;
    font-size: 1rem;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 0.5em 0.8em;
    margin-left: 0.2em;
}

.direction-arrow-side {
    padding: 0.5rem 0.8rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    min-width: 40px;
}

.direction-arrow-side:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.arrow-text {
    font-weight: 600;
    font-size: 1.2rem;
} 