:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
    --font-family: 'Times New Roman', Times, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background-color: var(--light-bg);
    padding: 20px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
}

h1 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #000;
    text-align: center;
}

h2 {
    font-size: 1.125rem;
    color: #ff6b6b;
}

h3 {
    font-size: 1rem;
    color: #000;
}

h4 {
    font-size: 0.9375rem;
    color: #000;
}

@media (min-width: 768px) and (max-width: 1024px) {
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
}

@media (min-width: 1025px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.375rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.125rem;
    }
}

.calculator-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1025px) {
    .calculator-wrapper {
        flex-direction: row;
    }
}

aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1025px) {
    aside {
        width: 300px;
    }
    
    .left-sidebar, .right-sidebar {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}

main {
    flex: 1;
}

.calculator {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

@media (prefers-color-scheme: dark) {
    .calculator {
        background: #333;
    }
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.input-field {
    flex: 1;
    min-width: 120px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 1rem;
    color: #000;
}

.action-group {
    display: flex;
    gap: 12px;
    margin: 25px 0;
}

.action-el {
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.el-calc {
    background-color: var(--teal);
    color: white;
}

.el-rst {
    background-color: var(--secondary);
    color: white;
}

.el-exp {
    background-color: var(--accent);
    color: white;
}

.action-el:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.results {
    display: none;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.result-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--teal);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    color: #000;
}

@media (prefers-color-scheme: dark) {
    .result-card {
        background: #444;
    }
}

.export-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.ad-container {
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    overflow: hidden;
    font-style: italic;
}

@media (prefers-color-scheme: dark) {
    .ad-container {
        background-color: #ffffff;
    }
}

#ad-mobile {
    width: 100%;
    height: 100px;
}

#ad-tablet {
    width: 300px;
    height: 250px;
    margin: 10px auto 0;
}

#ad-left, #related-tools {
    width: 300px;
}

#ad-left {
    height: 250px;
}

#ad-right {
    width: 300px;
    height: 600px;
}

/* Related Tools Styles */
#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);
    display: flex;
    align-items: center;
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list a {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tools-list a:hover {
    color: var(--teal);
}

@media (prefers-color-scheme: dark) {
    #related-tools {
        background: #444;
    }
    
    .tools-list a {
        color: #fff;
    }
}

/* Mobile and Tablet Related Tools */
.mobile-related-tools {
    display: none;
    margin-top: 20px;
}

/* Visibility rules */
#ad-left, #ad-right {
    display: none;
}

#ad-tablet {
    display: none;
}

@media (min-width: 768px) and (max-width: 1024px) {
    #ad-tablet {
        display: block;
    }
    /* Remove mobile ad from tablet */
    #ad-mobile {
        display: none;
    }
    /* Show related tools on tablet below ads */
    .mobile-related-tools {
        display: block;
    }
    /* Hide the left sidebar on tablet */
    .left-sidebar {
        display: none;
    }
}

@media (max-width: 767px) {
    #ad-mobile {
        display: block;
    }
    /* Show related tools on mobile below ads */
    .mobile-related-tools {
        display: block;
    }
    /* Hide the left sidebar on mobile */
    .left-sidebar {
        display: none;
    }
}

@media (min-width: 1025px) {
    #ad-left, #ad-right, #related-tools {
        display: block;
    }
    
    #ad-mobile, #ad-tablet, .mobile-related-tools {
        display: none;
    }
    /* Show the left sidebar on desktop */
    .left-sidebar {
        display: flex;
    }
}

.zodiac-icon {
    font-size: 1.375rem;
    margin-right: 8px;
    color: #000;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--teal);
    margin: 8px 0;
}

.input-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 5px;
    font-style: italic;
}

/* Add desktop related tools to mobile/tablet view */
.desktop-related-tools {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-related-tools {
        display: block;
        margin-top: 20px;
    }
    
    /* Make the Related Tools box width 100% on mobile and tablet */
    .desktop-related-tools #related-tools {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    .calculator, .calculator * {
        visibility: visible;
    }
    .calculator {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        background: white;
    }
    .action-group, .export-options, .ad-container, .mobile-related-tools, .desktop-related-tools {
        display: none !important;
    }
}

/* 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 {
    display: none;
    text-align: center;
    padding: 20px;
    color: #000;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--teal);
    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;
    color: #000;
}
.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-size: 1rem;
    font-weight: bold;
    color: #000;
}
.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}