/* CSS Variables */
:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background-color: var(--light-bg);
}

h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #000;
    text-align: center;
}

h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: #ff6b6b;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #000;
}

p {
    margin-bottom: 1rem;
    color: #000;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Main Content Area */
.main-content {
   
}

/* Converter Tool */
.converter-tool {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1rem;
    color: #000;
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: #000;
}

.time-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.time-inputs > div {
    flex: 1;
    min-width: 120px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    color: #000;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-primary {
    background-color: var(--teal);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-swap {
    background-color: var(--teal);
    color: white;
    width: 100%;
    margin-bottom: 15px;
}

.btn-primary:hover {
    background-color: #3aa89d;
}

.btn-secondary:hover {
    background-color: #e55a5a;
}

.btn-swap:hover {
    background-color: #3aa89d;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.results {
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.results.active {
    display: block;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.time-box {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    flex: 1;
    min-width: 150px;
    margin: 5px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.time-label {
    font-size: 1rem;
    color: #000;
    margin-bottom: 5px;
}

.time-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
}

.time-diff {
    color: #000;
    font-weight: bold;
}

/* Pie Chart */
.pie-chart-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pie-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--teal) 0% 50%,
        var(--light-bg) 50% 100%
    );
    position: relative;
}

.pie-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: #000;
}

/* Export Options */
.export-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.export-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: auto;
}

.export-btn:hover {
    background-color: var(--primary);
}

/* Ad Containers */
.ad-container {
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-color);
    margin-bottom: 20px;
    text-align: center;
    color: #000;
    font-size: 1rem;
}

#ad-left, #ad-right {
    display: none;
}

#ad-tablet {
    display: none;
}

#ad-mobile {
    width: 320px;
    height: 100px;
    margin: 0 auto 20px;
}

/* Related Tools */
#related-tools {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.tools-list {
    list-style: none;
}

.tools-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    color: #000;
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.tools-list a:hover {
    color: var(--teal);
}

/* Multiple Time Zones */
.multiple-zones {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.add-zone-btn {
    background-color: var(--teal);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    font-size: 1rem;
    width: auto;
}

.zone-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.zone-row select {
    flex: 1;
}

.zone-result {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    color: #000;
}

.remove-zone {
    background-color: var(--secondary);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

/* Tablet Styles */
@media (min-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
        color: #ff6b6b;
    }

    h3 {
        font-size: 1.125rem;
    }

    #ad-mobile {
        display: none;
    }

    #ad-tablet {
        display: flex;
        width: 300px;
        height: 250px;
        margin: 10px auto 20px;
    }

    .time-inputs {
        flex-wrap: nowrap;
    }

    .button-group {
        flex-wrap: nowrap;
    }

    .time-display {
        flex-wrap: nowrap;
    }

    .tablet-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Related tools positioning for tablet */
    .tablet-related-tools {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.375rem;
        color: #ff6b6b;
    }

    h3 {
        font-size: 1.25rem;
    }

    .main-content {
        display: grid;
        grid-template-columns: 300px 1fr 300px;
        gap: 20px;
        align-items: start;
    }

    #ad-left, #ad-right {
        display: flex;
        position: sticky;
        
    }

    #ad-left {
        width: 300px;
        height: 250px;
    }

    #ad-right {
        width: 300px;
        height: 600px;
    }

    #ad-tablet {
        display: none;
    }

    .related-tools-desktop {
        position: sticky;
     
        width: 300px;
    }

    .related-tools-mobile-tablet {
        display: none;
    }

    /* Make buttons 100% width on desktop too */
    .button-group button {
        width: 100%;
    }

    /* Fix for sticky positioning - ensure proper context */
    .left-sidebar, .right-sidebar {
        position: sticky;
        top: 20px;
      
        overflow-y: auto;
    }
    
    .left-sidebar {
        display: flex;
        flex-direction: column;
    
    }

    /* Ensure the main content area scrolls independently */
    main {
        height: fit-content;
    }
}

/* Mobile and Tablet Related Tools */
@media (max-width: 1024px) {
    .related-tools-desktop {
        display: none;
    }
}

/* Add breadcrumb styles */
.breadcrumb {
    padding: 0px 10px;
    color: #000;
    margin-bottom: 5px;
    font-size: 1rem;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}
    .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;
    }
    .mobile-table th {
        background-color: #4ecdc4;
        font-weight: bold;
    }
    .mobile-table tr:nth-child(even) {
        background-color: #fafafa;
    }
    .formula {
        font-family: 'Courier New', monospace;
        background-color: #f8f9fa;
        padding: 8px 12px;
        border-radius: 4px;
        border-left: 3px solid #4ecdc4;
        margin: 5px 0;
    }
    .formula-var {
        font-style: italic;
        color: #2c3e50;
    }