/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Blog post styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-post h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.blog-post h2 {
    font-size: 1.8rem;
    color: #c44d34;
    margin: 2rem 0 1rem;
}

.blog-post h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

.blog-post img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.blog-post p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1.5rem;
}

.blog-post ul, .blog-post ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-post li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.keyword {
    color: #2c3e50;
    font-weight: 600;
    background: #f7f9fc;
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

blockquote {
    margin: 2rem 0;
    padding: 1rem 2rem;
    border-left: 4px solid #c44d34;
    background: #f7f9fc;
    font-style: italic;
}

.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 1rem;
    border: 1px solid #dee2e6;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-post {
        padding: 1rem;
    }

    .blog-post h1 {
        font-size: 2rem;
    }

    .blog-post h2 {
        font-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile-first styles */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #6B46C1 0%, #3182CE 100%);
    color: white;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Form styles */
.calculator-form {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 1rem auto;
}

.form-label {
    font-weight: 500;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Location button */
#getCurrentLocation {
    white-space: nowrap;
    min-width: 160px;
    padding: 0.375rem 0.75rem;
}

#getCurrentLocation svg {
    margin-right: 0.25rem;
}

#getCurrentLocation .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* City autocomplete */
.city-results {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0.25rem;
}

.city-results.show {
    display: block;
}

.city-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.city-option:hover {
    background-color: #f8f9fa;
}

/* City results dropdown */
.city-results {
    display: none;
    position: absolute;
    z-index: 9999;
    width: calc(100% - 150px); /* Account for the location button */
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
}

.city-result {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-result:hover {
    background-color: #f8f9fa;
}

.city-result:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

/* Position relative for city input container */
.input-group {
    position: relative;
}

/* Understanding section */
.understanding-section img {
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

/* Result section */
#result {
    margin: 1.5rem auto;
}

#rulerResult {
    text-align: left;
}

#rulerResult h2 {
    color: #2B6CB0;
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

#rulerResult .lead {
    color: #4A5568;
    font-size: 1.1rem;
    line-height: 1.7;
}

#rulerInterpretation {
    color: #2D3748;
    text-align: left;
}

#rulerInterpretation h3 {
    color: #2B6CB0;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

.theme-list, .influence-list {
    list-style: none;
    padding-left: 0;
}

.theme-list li, .influence-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.theme-list li::before, .influence-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0d6efd;
}

.advice-text {
    font-style: italic;
    color: #495057;
    line-height: 1.6;
    padding: 1rem;
    background: #F7FAFC;
    border-radius: 0.5rem;
    border-left: 4px solid #4299E1;
    margin: 1rem 0;
}

/* Responsive breakpoints */
@media (min-width: 576px) {
    .calculator-form {
        padding: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    #rulerResult h2 {
        font-size: 2rem;
    }

    #rulerResult .lead {
        font-size: 1.2rem;
    }

    .theme-list li, .influence-list li {
        font-size: 1.1rem;
    }

    .advice-text {
        font-size: 1.1rem;
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (min-width: 992px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .calculator-form {
        padding: 2.5rem;
    }
}

:root {
    --primary-color: #6a4c93;
    --secondary-color: #8ac4d0;
    --text-color: #333;
    --light-bg: #f8f9fa;
}

.navbar-dark {
    background: linear-gradient(135deg, var(--primary-color), #4a3066) !important;
}

.introduction {
    background-color: white;
}

.introduction h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.introduction ul {
    list-style-type: none;
    padding-left: 0;
}

.introduction ul li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.introduction ul li:before {
    content: "✨";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.calculator {
    background-color: var(--light-bg);
}

.city-results {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0.25rem;
}

.city-results.show {
    display: block;
}

.city-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.city-option:hover {
    background-color: #f8f9fa;
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #003d80);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#result {
    margin: 2rem auto;
    max-width: 800px;
    transition: all 0.3s ease;
}

#result:not(.d-none) {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#rulerResult h2 {
    color: #2B6CB0;
    font-weight: 600;
}

#rulerResult .lead {
    color: #4A5568;
    font-size: 1.2rem;
    line-height: 1.7;
}

#rulerInterpretation {
    color: #2D3748;
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
}

#rulerInterpretation h3 {
    color: #2B6CB0;
    font-weight: 600;
    margin-top: 2rem;
}

#copyResult {
    transition: all 0.2s ease;
}

#copyResult:hover {
    transform: translateY(-1px);
}

#copyResult.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    border: none;
}

.img-fluid {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.understanding-section img {
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    min-height: 300px;
    background: linear-gradient(135deg, #EDF2F7, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.understanding-section img::before {
    content: "Image coming soon";
    position: absolute;
    color: #4A5568;
    font-size: 0.9rem;
}

.understanding-section img:hover {
    transform: translateY(-5px);
}

footer {
    background: #2D3748;
    color: white;
    padding: 2rem 0;
}

footer a {
    color: #63B3ED;
    transition: color 0.2s;
}

footer a:hover {
    color: #4299E1;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Navbar logo */
.navbar-brand img {
    filter: drop-shadow(0 0 2px rgba(74, 144, 226, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 4px rgba(74, 144, 226, 0.8));
}

.navbar-brand {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

html {
    overflow-x: hidden;
    width: 100vw;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.navbar .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar-brand {
    max-width: 90%;
    overflow: hidden;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

#languageSelector {
    max-width: 120px;
    font-size: 0.875rem;
}

/* Main content */
main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Forms */
.form-control, .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ced4da;
}

.form-select {
    padding-right: 2.5rem !important;
    background-position: right 0.75rem center !important;
    cursor: pointer;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Timezone select */
.timezone-wrapper {
    position: relative;
    width: 100%;
}

.timezone-wrapper .form-select {
    width: 100%;
    padding-right: 2.5rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Calculate button */
#birthDataForm .btn-primary {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    width: 100%;
    max-width: none;
    margin: 1.5rem 0 0;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    #birthDataForm .btn-primary {
        margin: 1rem 0 0;
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .form-select {
        padding-right: 2.5rem !important;
    }

    .timezone-wrapper .form-select {
        font-size: 0.9375rem;
    }
}

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .form-select {
        background-position: right 0.75rem center !important;
        padding-right: 2.5rem !important;
    }

    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center !important;
        background-size: 16px 12px;
        padding-right: 2.5rem !important;
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    width: 100%;
}

.card-body {
    padding: 1.5rem;
}

/* Results section */
#rulerResult h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.theme-list, .influence-list {
    list-style: none;
    padding-left: 0;
}

.theme-list li, .influence-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.theme-list li:before, .influence-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0d6efd;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Footer */
footer {
    width: 100%;
    margin-top: auto;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Interpretation Cards */
.interpretation-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interpretation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.interpretation-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.interpretation-card p {
    color: #596677;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .interpretation-card {
        padding: 1.25rem;
    }

    .interpretation-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .interpretation-card p {
        font-size: 0.9rem;
    }
}

/* Birth Chart Information Card Styles */
.card.border-primary {
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.border-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.15);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Chart Position Styling */
.card-body h6 {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.card-body h6 .me-2 {
    font-size: 1.2rem;
}

.card-body .fs-5 {
    font-size: 1.35rem !important;
    color: #0d6efd;
    font-weight: 700;
}

.card-body .text-muted.small {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Alert Info Box */
.alert-info {
    background-color: #e7f3ff;
    border-color: #b6d4fe;
    color: #084298;
    border-left: 4px solid #0d6efd;
}

.alert-info strong {
    color: #052c65;
}

/* Zodiac Symbol Styling */
.card-body .fs-5 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments for chart card */
@media (max-width: 768px) {
    /* Card container adjustments */
    .card.border-primary {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0.5rem;
        border-width: 1px;
    }
    
    /* Card header - more compact on mobile */
    .card-header.bg-primary {
        padding: 0.75rem 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    /* Card body - better spacing */
    .card-body {
        padding: 1rem;
    }
    
    .card-body .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Column adjustments - full width on mobile */
    .card-body .col-md-6 {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 1rem;
    }
    
    .card-body .col-md-6:last-child {
        margin-bottom: 0.5rem;
    }
    
    /* Section headers - smaller and more compact */
    .card-body h6 {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .card-body h6 .me-2 {
        font-size: 1rem;
    }
    
    /* Zodiac sign display - adjust size */
    .card-body .fs-5 {
        font-size: 1.25rem !important;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    /* Position text - smaller */
    .card-body .text-muted.small {
        font-size: 0.8rem;
    }
    
    /* Padding adjustments */
    .card-body .ps-4 {
        padding-left: 1rem !important;
    }
    
    /* Info alert - more compact */
    .card-body .alert-info {
        padding: 0.75rem;
        margin-top: 1rem;
        font-size: 0.85rem;
    }
    
    .card-body .alert-info small {
        font-size: 0.85rem;
    }
    
    /* Remove hover effect on mobile */
    .card.border-primary:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 576px) {
    .card.border-primary {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0.375rem;
    }
    
    .card-header h5 {
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .card-body .fs-5 {
        font-size: 1.15rem !important;
    }
    
    .card-body h6 {
        font-size: 0.825rem;
    }
    
    .card-body .alert-info {
        padding: 0.625rem;
        font-size: 0.8rem;
    }
}

/* Animation for chart card appearance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.border-primary {
    animation: slideInUp 0.5s ease-out;
}

/* Enhanced result section styling */
#rulerResult .card {
    margin-bottom: 1.5rem;
}

#rulerResult .lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #495057;
}

/* Copy button enhancement */
#copyResult {
    transition: all 0.3s ease;
    font-weight: 500;
}

#copyResult:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#copyResult:active {
    transform: translateY(0);
}


/* Mobile-specific improvements for result section */
@media (max-width: 768px) {
    /* Result section spacing */
    #result {
        padding: 0 0.5rem;
    }
    
    /* Main title adjustments */
    #rulerResult .h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* Lead paragraph */
    #rulerResult .lead {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Interpretation sections */
    #rulerInterpretation .h5 {
        font-size: 1.1rem;
    }
    
    #rulerInterpretation ul {
        padding-left: 1.25rem;
    }
    
    #rulerInterpretation li {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    /* Advice section */
    .advice-text {
        font-size: 0.95rem;
        padding: 0.875rem;
    }
    
    /* Copy button */
    #copyResult {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .card-body .col-md-6 {
        width: 50%;
        float: left;
    }
    
    .card-body .row.mt-2 {
        clear: both;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .card-body h6 {
        padding: 0.25rem 0;
    }
    
    /* Better spacing for touch */
    .card-body .mb-3 {
        margin-bottom: 1.25rem !important;
    }
    
    /* Disable animations on touch devices for better performance */
    .card.border-primary {
        animation: none;
    }
}

/* High DPI displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-body .fs-5 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}


/* Buy Me a Coffee button styling */
#bmc-wbtn {
    margin: 0 auto !important;
    display: inline-block !important;
}

/* Container for action buttons */
.text-center.mt-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Copy Result button */
#copyResult {
    min-width: 200px;
}

/* Mobile optimization for action buttons */
@media (max-width: 768px) {
    .text-center.mt-4 {
        gap: 0.75rem;
    }
    
    #copyResult {
        width: 100%;
        max-width: 300px;
    }
    
    #bmc-wbtn {
        width: 100% !important;
        max-width: 300px !important;
    }
    
    /* Ensure BMC button is responsive */
    #bmc-wbtn img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    #copyResult {
        font-size: 0.95rem;
        padding: 0.625rem 1rem;
    }
}

/* Buy Me a Coffee Card Styles */
.bmc-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border: 2px solid #ffd966;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bmc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.25);
}

.bmc-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.bmc-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.bmc-text-content {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.bmc-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.25rem;
}

.bmc-description {
    font-size: 0.9rem;
    color: #856404;
    margin-bottom: 0;
    opacity: 0.9;
}

.bmc-cta-button {
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.bmc-cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Toast Notification Styles */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    pointer-events: none;
    max-width: 400px;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    min-width: 150px;
}

.toast-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toast-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .bmc-card-content {
        flex-direction: column;
        text-align: center;
    }
    
    .bmc-text-content {
        text-align: center;
    }
    
    .bmc-cta-button {
        width: 100%;
    }
    
    .copy-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast-content {
        justify-content: center;
    }
}
