/* Advanced Date Calculator Styles */
body {
    background-color: #f0f2f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    justify-content: center;
    /* Allow scrolling */
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.content-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 20px;
}

/* SEO Content Styles */
.seo-content-top {
    margin-bottom: 20px;
}

.seo-content-top h2,
.seo-content-bottom h2,
.seo-content-bottom h3 {
    color: #2d3436;
}

.seo-content-top h2 {
    text-align: center;
    font-size: 24px;
    line-height: 1.4;
}

.seo-content-bottom {
    margin-top: 40px;
    color: #4b5563;
    line-height: 1.6;
}

.seo-content-bottom h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 24px;
}

.seo-content-bottom h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 20px;
}

/* Responsive Image */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Lists */
.seo-content-bottom ul,
.seo-content-bottom ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-content-bottom li {
    margin-bottom: 8px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

th {
    background-color: #f8f9fa;
    color: #2d3436;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f1f3f5;
}

/* ADC Container (Calculator) */
.adc-container {
    background-color: #ffffff;
    color: #495057;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
    margin: 0 auto;
    /* Center the calculator */
}

.adc-title {
    text-align: center;
    margin-bottom: 25px;
    color: #6c5ce7;
    font-size: 28px;
    font-weight: 700;
}

/* Tabs */
.adc-tabs {
    display: flex;
    border-bottom: 2px solid #f1f3f5;
    margin-bottom: 25px;
}

.adc-tab {
    padding: 12px 15px;
    cursor: pointer;
    color: #adb5bd;
    position: relative;
    text-align: center;
    flex: 1;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.adc-tab:hover {
    color: #8c7ae6;
    background-color: #f8f9fa;
}

.adc-tab.active {
    color: #6c5ce7;
    background-color: transparent;
}

.adc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #6c5ce7;
}

/* Tab Content */
.adc-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.adc-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.adc-form-group {
    margin-bottom: 20px;
}

.adc-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.adc-form-col {
    flex: 1;
    padding: 0 10px;
    min-width: 80px;
    margin-bottom: 20px;
}

.adc-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

.adc-input-wrapper {
    position: relative;
}

.adc-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    color: #495057;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    /* Fix sizing */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.adc-input:focus {
    outline: none;
    border-color: #a29bfe;
    box-shadow: 0 0 0 3px rgba(162, 155, 254, 0.2);
}

.adc-today-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(108, 92, 231, 0.1);
    border: none;
    color: #6c5ce7;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.adc-today-btn:hover {
    background: rgba(108, 92, 231, 0.2);
}

/* Toggle Switch */
.adc-toggle-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
    justify-content: space-between;
}

.adc-toggle-label {
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
}

.adc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.adc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.adc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9ecef;
    transition: .3s;
    border-radius: 24px;
}

.adc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.adc-toggle-slider {
    background-color: #a29bfe;
}

input:checked+.adc-toggle-slider:before {
    transform: translateX(20px);
}

/* Button */
.adc-button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #6c5ce7;
    background-image: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.adc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.adc-button:active {
    transform: translateY(0);
}

/* Results */
.adc-results {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.adc-result-title {
    text-align: center;
    color: #868e96;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adc-result-value {
    text-align: center;
    color: #6c5ce7;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.adc-result-value:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .adc-form-col {
        flex: 0 0 50%;
        /* 2 per row on mobile */
    }

    .adc-tabs {
        flex-direction: column;
        /* Stack tabs on very small screens if needed, or keep row */
    }

    .adc-tab {
        border-radius: 4px;
    }

    /* Responsive Table */
    table {
        display: block;
        overflow-x: auto;
    }
}

/* Error message */
.adc-error {
    color: #ff6b6b;
    font-size: 14px;
    margin: 10px 0;
    text-align: center;
    display: none;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 6px;
}

/* Dark/Light mode toggle */
.adc-theme-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
    color: #adb5bd;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    transition: all 0.3s;
}

.adc-theme-toggle:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Dark theme */
/* Update base container for transparency in dark mode or keep as is? 
   The body changes color, but our content wrapper should likely remain consistent or adapt.
   Let's ensure the content-wrapper text is readable in dark mode if the user sets dark mode on the body.
   Wait, the script toggles 'dark-mode' on body and 'adc-dark-theme' on adc-container.
   I need to add styles for .content-wrapper in dark mode.
*/

body.dark-mode {
    background-color: #12161a;
    color: #d2dae2;
}

.adc-dark-theme.adc-container {
    background-color: #1e272e;
    color: #d2dae2;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.adc-dark-theme .adc-title {
    color: #a29bfe;
}

.adc-dark-theme .adc-tabs {
    border-bottom: 2px solid #2d3436;
}

.adc-dark-theme .adc-tab:hover {
    background-color: #2d3436;
    color: #a29bfe;
}

.adc-dark-theme .adc-tab.active {
    color: #a29bfe;
}

.adc-dark-theme .adc-input {
    background-color: #2d3436;
    border-color: #485460;
    color: #f5f6fa;
}

.adc-dark-theme .adc-input:focus {
    border-color: #a29bfe;
}

.adc-dark-theme .adc-results {
    background-color: #2d3436;
    border-color: #485460;
}

.adc-dark-theme .adc-result-value {
    color: #a29bfe;
}

.adc-dark-theme .adc-toggle-slider {
    background-color: #485460;
}

.adc-dark-theme .adc-toggle-slider:before {
    background-color: #d2dae2;
}

.adc-dark-theme .adc-theme-toggle {
    background-color: #2d3436;
    color: #d2dae2;
}

.adc-dark-theme .adc-theme-toggle:hover {
    background-color: #485460;
    color: #fff;
}

/* Dark Mode support for SEO content */
body.dark-mode .seo-content-top h2,
body.dark-mode .seo-content-bottom h2,
body.dark-mode .seo-content-bottom h3,
body.dark-mode .seo-content-bottom {
    color: #d2dae2;
}

body.dark-mode th {
    background-color: #2d3436;
    color: #a29bfe;
    border-bottom-color: #485460;
}

body.dark-mode td {
    background-color: #1e272e;
    color: #d2dae2;
    border-bottom-color: #485460;
}

body.dark-mode tr:hover td {
    background-color: #2d3436;
}

body.dark-mode table {
    background-color: #1e272e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Navigation Button */
.nav-header {
    display: flex;
    justify-content: flex-end;
    /* Right aligned as requested */
    margin-bottom: 20px;
}

.home-button {
    display: inline-block;
    background-color: #e74c3c;
    /* Red color */
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.home-button:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

.home-button:active {
    transform: translateY(0);
}