/* Custom CSS for Bootstrap Unit Converter - Clean & Simple */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-color: #e5e7eb;
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    padding-top: 70px;
}

/* Navbar */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 0;
    margin-bottom: 0;
}

.hero-section h1 {
    color: white;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Main Converter Section */
.converter-section {
    background: white;
    padding: 40px 0;
}

.converter-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.converter-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none;
    padding: 30px;
    text-align: center;
}

.converter-card .card-header h3 {
    color: white;
    font-weight: 700;
    margin: 0;
}

.converter-card .card-body {
    padding: 40px;
    background: white;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-select,
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.form-select-lg,
.form-control-lg {
    padding: 12px 16px;
    font-size: 1rem;
}

/* Conversion Panel Layout */
.conversion-row {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
}

/* Swap Button */
.swap-btn {
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.swap-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Result Display */
.result-display {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    color: #166534;
    font-weight: 500;
}

.result-display.has-result {
    background: #f0fdf4;
    border-color: #22c55e;
}

/* Stats Card */
.stats-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Popular Conversions */
.popular-section {
    background: #f8fafc;
    padding: 60px 0;
}

.popular-section h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 40px;
}

.conversion-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    overflow: hidden;
}

.conversion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.conversion-card .card-body {
    padding: 25px;
    text-align: center;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

.conversion-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.conversion-card .card-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.conversion-card .badge {
    background: #f3f4f6 !important;
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Engineering Math Tools Styles */
.nav-tabs .nav-link {
    color: var(--dark-color);
    border: none;
    border-radius: 10px 10px 0 0;
    margin-right: 5px;
    background: transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    min-height: 400px;
    padding: 20px 0;
}

.results {
    background: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-family: 'Courier New', monospace;
}

.results strong {
    color: var(--primary-color);
}

/* Math Tools Cards */
.conversion-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    height: 100%;
}

.conversion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.conversion-card .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.5rem;
}

.conversion-card .card-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.conversion-card .card-text {
    color: #6b7280;
    margin-bottom: 0;
}

/* Math Expression Input */
#mathExpression {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* Statistics Data Input */
#statsData {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

/* Math Result Display */
#mathResult, #quadraticResult, #linearResult, #statsResult {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

/* Quick Math Tools Grid */
.conversion-card .badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
}
