:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
}

body {
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background-color: var(--light-bg);
    max-width: 1400px;
    margin: 0 auto;
   
}

.container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0px 10px;
}

.calculator-container {
    display: flex;
    flex-direction: column;
  
}

#converter-tool {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar {
    display: none;
}

.ad-zone {
    background-color: var(--light-bg);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    font-family: 'Times New Roman', Times, serif;
}

#ad-mobile {
    width: 90%;
    height: 100px;
    margin: 20px auto; 
}

#ad-tablet {
    display: none;
    width: 300px;
    height: 250px;
    margin: 10px auto 0;
}

#related-tools {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
    font-family: 'Times New Roman', Times, serif;
}

#related-tools {
    margin-bottom: 15px;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

#related-tools ul {
    list-style-type: none;
}

#related-tools li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#related-tools a {
    color: #000;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
}

#related-tools a:hover {
    color: var(--secondary);
}

h1 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 20px;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
}

h2 {
    font-size: 1.375rem;
    color: #ff6b6b;
    margin: 20px 0 15px;
    font-family: 'Times New Roman', Times, serif;
}

h3 {
    font-size: 1.25rem;
    color: #000;
    margin: 15px 0 10px;
    font-family: 'Times New Roman', Times, serif;
}

.section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

input, select, textarea, button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #000;
}

button {
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}

#calculate-btn {
    background-color: var(--accent);
}

#calculate-btn:hover {
    background-color: var(--primary);
}

#reset-btn {
    background-color: var(--secondary);
}

#reset-btn:hover {
    background-color: #e55c5c;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group button {
    flex: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

table, th, td {
    border: 1px solid var(--border-color);
}

th, td {
    padding: 8px;
    text-align: left;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

th {
    background-color: var(--light-bg);
    font-size: 1rem;
}

.output-section {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.output-card {
    background: var(--light-bg);
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.output-card {
    margin-top: 0;
    color: #000;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.output-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Times, serif;
    overflow-x: auto;
    white-space: nowrap;
    color: #000;
}

.export-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.export-options button {
    flex: 1;
    min-width: 120px;
    background-color: var(--teal);
}

/* Virtual Keyboard */
.virtual-keyboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 10px;
    display: none;
}

.keyboard-key {
    padding: 10px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.keyboard-key:hover {
    background-color: var(--border-color);
}

.toggle-keyboard {
    background: none;
    border: none;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 10px;
    text-align: right;
    width: auto;
    font-family: 'Times New Roman', Times, serif;
}

/* File upload styling */
.file-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 1rem;
    color: #000;
}

/* Mobile Related Tools */
#related-tools-mobile {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto; 
    font-family: 'Times New Roman', Times, serif;
    width: 90%;
}

#related-tools-mobile {
    margin-bottom: 15px;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

#related-tools-mobile ul {
    list-style-type: none;
}

#related-tools-mobile li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#related-tools-mobile a {
    color: #000;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
}

#related-tools-mobile a:hover {
    color: var(--secondary);
}

/* Mobile Layout - Results in 1 column with horizontal scroll */
.output-section-mobile {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    overflow-x: auto;
}

.output-card-mobile {
    background: var(--light-bg);
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    min-width: 300px; /* Ensure cards don't get too narrow */
}

.output-card-mobile {
    margin-top: 0;
    color: #000;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.output-item-mobile {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Times, serif;
    overflow-x: auto;
    white-space: nowrap;
    color: #000;
}

/* Tablet Layout */
@media (min-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    #ad-mobile {
        display: none;
    }
    
    #ad-tablet {
        display: flex;
    }
    
    .output-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        flex-direction: row;
    }

    .virtual-keyboard {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Show related tools on tablet */
    #related-tools-tablet {
        display: block;
        margin-top: 20px;
    }
}

/* Desktop Layout */
@media (min-width: 1025px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.375rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        flex-direction: row;
    }
    
    .sidebar {
        display: block;
        width: 300px;
    }
    
    .main-content {
        flex: 1;
    }
    
    .sidebar-left, .sidebar-right {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
    
    #ad-left {
        width: 300px;
        height: 250px;
    }
    
    #ad-right {
        width: 300px;
        height: 600px;
    }
    
    #ad-mobile, #ad-tablet {
        display: none;
    }
    
    .output-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .virtual-keyboard {
        grid-template-columns: repeat(8, 1fr);
    }

    #related-tools {
        margin-top: 0;
    }

    /* Hide the mobile related tools on desktop */
    #related-tools-mobile {
        display: none;
    }
}

/* Mobile responsive headings */
@media (max-width: 767px) {
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4 {
        font-size: 0.9375rem;
        color: #000;
    }
}

/* Tablet responsive headings */
@media (min-width: 768px) and (max-width: 1024px) {
    h4 {
        font-size: 1rem;
        color: #000;
    }
}

/* Desktop responsive headings */
@media (min-width: 1025px) {
    h4 {
        font-size: 1.125rem;
        color: #000;
    }
}

/* Add horizontal scrolling for desktop and tablet */
@media (min-width: 768px) {
    .output-section {
        overflow-x: auto;
    }
}
/* Add breadcrumb styles */
.breadcrumb {
    padding: 0px 10px;
    color: #000;
    margin-bottom: 5px;
    font-size: 1rem;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Loading spinner */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #000;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--accent);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


    .mobile-table {
        overflow-x: auto;
        margin: 20px 0;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    .mobile-table table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
    }
    .mobile-table th, .mobile-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #eee;
        color: #000;
    }
    .mobile-table th {
        background-color: #4ecdc4;
        font-weight: bold;
        font-size: 1rem;
    }
    .mobile-table tr:nth-child(even) {
        background-color: #fafafa;
    }