* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Calculator Button Styling */
.calculator-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 200px;
    margin-top: 10px;
}

.calculator-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.calculator-form button:active {
    transform: translateY(1px);
}

/* Calculator Result Styling */
.calculator-result {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.calculator-result h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.calculator-result p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.result-category {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: #495057 !important;
    margin-top: 10px !important;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-top: 70px; /* Increased for fixed nav */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* New Navigation Bar Styles */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a2a6c, #2a3990, #1a2a6c);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.desktop-nav {
    display: flex;
    gap: 5px;
}

.nav-dropdown {
    position: relative;
}

.nav-item {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f1f7ff;
    color: #2a3990;
    padding-left: 20px;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Hamburger animation */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 10px 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav .nav-dropdown {
    margin-bottom: 5px;
}

.mobile-nav .nav-item {
    padding: 12px 20px;
    color: #333;
    background: none;
    position: relative;
}

.mobile-nav .nav-item::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.mobile-nav .nav-dropdown.active .nav-item::after {
    transform: translateY(-50%) rotate(45deg);
}

.mobile-nav .dropdown-content {
    position: static;
    box-shadow: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    opacity: 1;
    transform: none;
    background-color: #f8f9fa;
}

.mobile-nav .nav-dropdown.active .dropdown-content {
    max-height: 500px;
}

/* Header Styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.converter-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.converter-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-top: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.unit-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.swap-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.swap-btn:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.precision-control {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.precision-control label {
    font-size: 0.9rem;
    color: #6c757d;
}

.precision-control input {
    width: 80px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.result-display {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-display h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.common-conversions {
    margin-top: 30px;
}

.common-conversions h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.conversion-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.conversion-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.info-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.info-section h3 {
    color: #495057;
    margin-bottom: 15px;
}

.info-section p, .info-section ul {
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-section ul {
    padding-left: 20px;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #6c757d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-container:hover .copy-btn {
    opacity: 1;
}

.copy-feedback {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Media Queries */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .mobile-nav.active {
        display: block;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .converter-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .swap-btn {
        justify-self: center;
        transform: rotate(90deg);
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .converter-section, .info-section {
        padding: 20px;
    }
    
}