/* Navigation Bar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo a:hover {
    color: #4361ee;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4361ee;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    margin-top: 1rem;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #4361ee;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.7rem;
}

/* Base Styles */
:root {
    --primary-color: #4a6bff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7ff;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #4a6bff, #6c5ce7);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Converter Box */
.converter-box {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: center;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.1rem;
    width: 120px;
    text-align: center;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

.input-group span {
    font-size: 1.5rem;
    font-weight: bold;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
}

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

/* Result Section */
.result-section {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.result {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.fraction-display {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.equals {
    font-size: 1.8rem;
    font-weight: bold;
    color: #555;
}

.decimal-result {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 100px;
    padding: 5px 15px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    font-weight: 500;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.quick-conversions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.quick-conversions button {
    background: #f0f2ff;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-conversions button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Info Section */
.info-section {
    background: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.info-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-section h3 {
    color: #444;
    margin: 1.5rem 0 1rem;
}

/* Conversion Table */
.conversion-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.table-row.header {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.cell {
    flex: 1;
    padding: 12px 15px;
    text-align: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 4rem 0 0;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: #4361ee;
}

.footer-section p {
    color: #ecf0f1;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

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

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

.footer-section ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #4361ee;
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

.footer-bottom p {
    margin: 0;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links span {
    color: #7f8c8d;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4361ee;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 99;
}

#back-to-top:hover {
    background: #3a56d4;
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    #back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .result {
        flex-direction: column;
    }
    
    .feature {
        margin-bottom: 1.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}
