* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
}

html {
  overflow-x: hidden;
}


body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    color: white;
    background-image: url('../images/night-sky-background.jpg');
    overflow-x: hidden;
    padding-top: var(--total-header-height);
}

.responsive-svg {
    width: 80vw; /* 80% of the viewport width */
    height: auto; /* Maintain aspect ratio */
    max-width: 600px; /* Prevent it from getting too large */
    display: block;
    margin: auto;
}

/* Top navigation bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1001;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* Mobile menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #FA812F;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: #FA812F;
    background: linear-gradient(135deg, #FA812F, #FF6138 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.top-nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.top-nav-link.signin {
    background: linear-gradient(45deg, #FA812F, #FF6138);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.top-nav-link.signin:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

:root {
    --navbar-height: 40px;
    --header-height: 60px;
    --total-header-height: calc(var(--navbar-height) + var(--header-height));
}

/* Header with horizontal navigation */
.header {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    height: var(--header-height);
    background-image: url('../images/night-sky-background.jpg');
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 998;
    transition: all 0.3s ease;
}

/* Horizontal Navigation Bar */
.horizontal-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, transparent 0%, transparent 100%);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    opacity: 0.1;
}

.nav-link:hover {
    background: linear-gradient(45deg, #FA812F, #FF6138);
    color: white;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-link.active:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

    .dropdown-arrow {
        transition: transform 0.3s ease;
        font-size: 12px;
    }

    .nav-item.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    /* Dropdown Menu */
    .dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 220px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.95);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1001;
        border: 1px solid rgba(102, 126, 234, 0.1);
        overflow: hidden;
    }

    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .dropdown-item {
        display: block;
        padding: 14px 18px;
        color: #4a5568;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        position: relative;
        cursor: pointer;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .dropdown-item:hover {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
        color: #667eea;
        padding-left: 22px;
    }

    .dropdown-item:hover::before {
        opacity: 1;
    }

    
    /* Submenu bar with sidebar toggle */
    .submenu-bar {
        position: fixed;
        top: 100px;
        left: 20px;
        height: 50px;
        background-color: transparent;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        padding: 0;
        z-index: 999;
        transition: all 0.3s ease;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        border-radius: 6px;
    }

    .submenu-bar.visible {
        top: 50px;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .submenu-bar.span {
        font-size: 14px;
    }

    .sidebar-toggle {
        background: linear-gradient(45deg, #FA812F, #FF6138);
        border: none;
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .sidebar-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .sidebar-toggle:active {
        transform: translateY(0);
    }

    .sidebar-toggle:disabled {
        background: #ccc;
        cursor: not-allowed;
        box-shadow: none;
        opacity: 0.6;
    }

    .sidebar-toggle:disabled:hover {
        transform: none;
        box-shadow: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        width: 16px;
        height: 12px;
        justify-content: space-between;
    }

    .hamburger span {
        display: block;
        height: 2px;
        background: white;
        border-radius: 1px;
        transition: all 0.3s ease;
    }

    .sidebar-toggle.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .sidebar-toggle.active .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .sidebar-toggle.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }


    /* For tablets and smaller screens (medium and below) */
    @media (max-width: 1024px) {
        .sidebar-toggle {
            position: absolute !important;
            top: 40px; /* Position from top of parent */
            left: 20px; /* Position from left of parent */
            width: 40px; /* Just enough for icon */
            height: 40px;
            padding: 10px;
            justify-content: center;
            gap: 0;
        }
        
        .sidebar-toggle span {
            display: none; /* Hide the text */
        }
        
        /* Hide hamburger menu, show explore icon instead */
        .hamburger {
            display: none;
        }
        
        /* Add explore icon using CSS */
        .sidebar-toggle::before {
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            content: "\f002"; /* fa-search */
            font-size: 16px;
            line-height: 1;
            color: white;
        }
    }
    

    .chart-status {
        margin-left: 15px;
        font-size: 13px;
        color: #666;
        font-weight: 500;
    }

    .chart-status.loaded {
        color: #8CA4CF;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1001;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar drawer */
    .sidebar-drawer {
        position: fixed;
        top: 0;
        left: -320px;
        width: 320px;
        height: 100%;
        background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1002;
        overflow-y: auto;
    }

    .sidebar-drawer.active {
        left: 0;
    }

    .sidebar-header {
        padding: 25px 20px;
        background-color: #872686;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    .sidebar-title {
        font-size: 22px;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .sidebar-subtitle {
        font-size: 14px;
        opacity: 0.9;
    }

    /* Navigation styles */
    .list-unstyled {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    ul.scrollable-list {
        height: 300px;
        max-height: 50vh; /* Add responsive max-height */
        overflow-y: auto;
        scrollbar-width: auto; /* Firefox */
        scrollbar-color: #888 #f1f1f1; /* Firefox */
    }

    ul.scrollable-list::-webkit-scrollbar {
        width: 12px;
    }

    ul.scrollable-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    ul.scrollable-list::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    ul.scrollable-list::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    /* Media query for smaller laptop screens */
@media (max-height: 700px) {
    ul.scrollable-list {
        height: 200px;
        max-height: 40vh;
    }
    
    .modal-content {
        margin: 2% auto;
        max-height: 150vh;
    }
}

    .components {
        padding: 20px 0;
    }

    .components li {
        margin: 4px 12px;
        border-radius: 10px;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .components li:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    }

    .components li.disabled {
        opacity: 0.4;
        pointer-events: none;
    }

    .components li.disabled:hover {
        transform: none;
        box-shadow: none;
    }

    .section-link {
        display: block;
        padding: 12px 15px;
        color: #4a5568;
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        transition: all 0.3s ease;
        border-left: 4px solid transparent;
        position: relative;
        overflow: hidden;
    }

    .section-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
        transition: left 0.5s ease;
    }

    .section-link:hover::before {
        left: 100%;
    }

    .section-link:hover {
        color: #872686;
        background: rgba(102, 126, 234, 0.05);
        border-left-color: #8CA4CF;
        padding-left: 24px;
    }

    .section-link.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-left-color: #8CA4CF;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    .section-link.active:hover {
        color: white;
        padding-left: 24px;
    }

    .section-link.disabled {
        color: #ccc;
        cursor: not-allowed;
    }

    .section-link.disabled:hover {
        color: #ccc;
        background: none;
        border-left-color: transparent;
        padding-left: 20px;
    }

    /* Main content */
    .main-content {
        margin-top: 10px;
        padding: 10px 10px 10px 10px;
        transition: all 0.3s ease;
    }

    .main-content.with-submenu {
        margin-top: 10px;
        padding: 10px 10px 10px 10px;
        transition: all 0.3s ease;
    }

    .header-container {
        height:auto;
        min-height:0;
        line-height: normal;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;   /* Vertically center */
        justify-content: center; /* Horizontally center */
        font-size: 14px;
    }
      
    
    .navbar-brand {
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        padding:0; 
        margin:0; 
        display: flex;
        word-wrap: break-word; 
        align-items: center; 
    }

    #contentHeader.navbar-brand {
        font-size: 14px !important;
        padding:0; 
        margin:0; 
        white-space: nowrap;
        text-align: center;
        display: flex;
        word-wrap: break-word; 
        align-items: center; 
    }

    .rp-generated-date {
        font-size: 12px;
        color: white;
    }
      
    .transit-toggle {
        margin: 0;             /* Remove default margins */
    }

    .start_page_left h2 {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-weight: 800;
        line-height: 1.66em;
        font-size: 200px;
        color: white;
    }
    .start_page_left div {
        font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-weight: 300;
        line-height: 1.5em;
        margin: 10px 10px 80px 10px;
        font-size: 16px;
        color: white;
    }

    .start_page_right h3 {
        font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-weight: 800;
        line-height: 1em;
        font-size: 20px;
        color: yellow;
    }

    .moon-image-left {
            float: left;
            margin-right: 15px;
    }

    .content-section {
        overflow-y: auto;
        backdrop-filter: blur(10px);
        border-radius: 5px;
        padding: 5px;
        box-shadow: 0 20px 20px rgba(0, 0, 0, 0.1);
        background-color: transparent;
        display: flex;
    }

    .content-section h2 {
        color: #FA812F;
        margin-bottom: 20px;
        font-size: 20px;
        font-weight: 700;
    }

    .content-section p {
        line-height: 1.6;
        color: #666;
        font-size: 16px;
    }

    /* Responsive design */
    @media (max-width: 768px) {

        .main-content {
            margin-top: 100px;
            padding: 10px 5px 20px 5px;
            transition: all 0.3s ease;
    }

        .sidebar-drawer {
            width: 280px;
            left: -280px;
        }
        
        .content-section {
            padding: 5px 5px;
            margin: 5px;
        }

        .horizontal-nav {
            gap: 15px;
        }

        .nav-link {
            font-size: 13px;
            padding: 8px 12px;
        }

        .dropdown-menu {
            min-width: 200px;
            left: -50px;
        }

        .page-title {
            font-size: 16px;
        }

        .top-nav-links {
            gap: 10px;
        }

        .top-nav-link {
            font-size: 13px;
            padding: 6px 10px;
        }

        /* Hide regular nav links on mobile */
        .top-nav-links {
            position: fixed;
            top: 40px;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(10px);
            flex-direction: column;
            align-items: flex-start;
            padding: 20px;
            gap: 15px;
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
            transform: translateY(-100%);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1000;
        }
        
        .top-nav-links.active {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
        }
        
        .mobile-menu-btn {
            display: flex;
        }
        
        .top-nav-link {
            width: 100%;
            padding: 10px 0;
        }

        .footer-content {
            grid-template-columns: 1fr;
            gap: 20px;
        }
    }

    @media (max-width: 480px) {
        .header {
            padding: 0 15px;
        }

        .top-nav {
            padding: 0 15px;
        }

        .horizontal-nav {
            gap: 10px;
        }

        .nav-link {
            font-size: 12px;
            padding: 6px 10px;
            font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
        }

        .dropdown-menu {
            left: -80px;
            min-width: 180px;
        }

        .page-title {
            font-size: 14px;
        }

        .top-nav-links {
            gap: 8px;
        }

        .top-nav-link {
            font-size: 12px;
            padding: 4px 8px;
        }
    }

    /* Smooth scrollbar for sidebar */
    .sidebar-drawer::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-drawer::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }

    .sidebar-drawer::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 3px;
    }

    .sidebar-drawer::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.5);
    }

    /* Footer styles */
    .footer {
        background-image: url('../images/night-sky-background.jpg');
        color: white;
        padding: 40px 20px 20px 20px;
        margin-top: 50px;
    }

    .footer-content {
        max-width: 1200px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
        margin-bottom: 30px;
    }

    .footer-section h3 {
        color: white;
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .footer-section ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-section ul li {
        margin-bottom: 8px;
    }

    .footer-section ul li a {
        color: white;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        display: inline-block;
    }

    .footer-section ul li a:hover {
        color: white;
        transform: translateX(5px);
    }

    .footer-section p {
        color: white;
        font-size: 14px;
        line-height: 1.6;
    }

    .footer-bottom {
        border-top: 1px solid rgba(203, 213, 224, 0.2);
        padding-top: 20px;
        text-align: center;
        color: white;
        font-size: 13px;
    }

    .footer-bottom .social-links {
        margin-top: 10px;
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .social-links a {
        color: white;
        font-size: 16px;
        transition: all 0.3s ease;
    }

.social-links a:hover {
        color: white;
        transform: translateY(-2px);
}

#birthDay, #birthMonth {
        width: 40px;
}
    
#birthYear {
        width: 120px;
}

#birthPlaceDropdown {
        display: none; /* Hide the dropdown initially */
        position: absolute;
        z-index: 10;
        max-height: 200px;
        overflow-y: auto;
        width: 200px;
}

#birthPlaceDropdown option {
        padding: 5px;
        cursor: pointer;
}

.form-group {
        margin-bottom: 10px;
}
label {
        display: block;
        margin-bottom: 4px;
        font-weight: bold;
}
input, select {
        padding: 5px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
}
.short-input {
    width: 60px;
}

.medium-input {
    width: 100px;
}

.inline-inputs {
        display: flex;
        gap: 5px;
}
.inline-inputs input, .inline-inputs select {
        flex: 1;
}
button {
        background-color: #4CAF50;
        color: white;
        padding: 10px 15px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
}
button:hover {
        background-color: #45a049;
}
.error {
        color: red;
        font-size: 14px;
        margin-top: 5px;
}
#coordinates {
        margin-top: 5px;
        display: flex;
        gap: 10px;
}
#coordinates input {
        width: 50px;
}
#coordinatesFields {
        display: block;
}

.jyotish_button {
        background: linear-gradient(45deg, #FA812F, #FF6138);
        border: none;
        color: white;
        padding: 8px 12px;
        margin:5px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
        display: inline-flex;
        align-items: center;
        gap: 6px;
}

.jyotish_button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.jyotish_big_button {
        background: linear-gradient(45deg, #FA812F, #FF6138);
        border: none;
        color: white;
        padding: 10px 20px; 
        margin:5px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 16px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
        display: inline-block; 
        text-align: center; 
        gap: 6px;
        align-items: center;
        width: 100%; 
}

.jyotish_big_button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.disabled {
        pointer-events: none;
        opacity: 0.5;
        color: #ccc;
        cursor: not-allowed;
        background-color: lightgray;
}

#kundali_chat_div {
    height: 600px; /* Set fixed height */
    display: flex;
    flex-direction: column;
}

#kundali_chat_history {
    flex: 1;
    height: 400px;
    overflow-y: auto; /* Add vertical scrollbar when needed */
    padding: 10px;
    display: flex;
    flex-direction: column;
    border: 1px solid lightgray;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    scrollbar-width: auto; /* For Firefox */
    scrollbar-color: #888 #f1f1f1; /* For Firefox */
}

/* Add custom scrollbar styling for Webkit browsers (Chrome, Safari, Edge) */
#kundali_chat_history::-webkit-scrollbar {
    width: 16px; /* Make scrollbar wider (default is usually 12px) */
}

#kundali_chat_history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

#kundali_chat_history::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
    border: 2px solid #f1f1f1; /* Adds some padding around the thumb */
}

#kundali_chat_history::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#kundali_chat_active {
    display: grid;
    grid-template-rows: 1fr auto auto; /* chat history, input area, processing */
    height: 100%;
}

#kundali_chat_input_area {
    border-top: 1px solid #ddd;
    padding: 10px;
    background: white;
    display: flex; /* Add flexbox layout */
    align-items: flex-start; /* Align items at the top */
    gap: 10px; /* Add space between textarea and button */
}

#kundali_chat_input {
    flex: 1; /* Take up remaining space */
    min-height: 60px;
    max-height: 100px;
    resize: vertical; /* allow resizing if you want */
    border: 1px solid lightgray;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 5px;
    margin: 0; /* Remove margin since we're using gap */
    white-space: pre-line;
    overflow-y: auto;
}

#kundali_chat_input_buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align button to top */
    flex-shrink: 0; /* Prevent the button container from shrinking */
}

#predefined_questions {
    white-space: nowrap; /* Prevent button text from wrapping */
    height: fit-content; /* Button height adjusts to content */
    margin: 0; /* Remove any default margins */
    min-width: 80px; /* Set minimum width for the button */
    max-width: 120px; /* Set maximum width to prevent excessive growth */
    flex-shrink: 0; /* Prevent button from shrinking */
    flex-grow: 0; /* Prevent button from growing */
    padding: 8px 16px; /* Set consistent padding */
}

.chat_query {
    width: auto;
    max-width: 80%; 
    min-width: 100px;
    align-self: flex-end; /* Right alignment - changed from flex-start */
    background-color: #70aced; /* Added background color - changed from transparent */
    color: white;
    border-radius: 5px;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 5px; /* Right margin instead of left - changed from margin-left */
    margin-left: auto; /* Push to right - added */
    clear: both;
    white-space: pre-line;
    text-align: right; /* Right-align text within the element - added */
}

.chat_response {
    width: 80%;
    align-self: flex-start; /* Left alignment - keep as is */
    background-color: rgb(191, 212, 244);
    color: black;
    border-radius: 5px;
    padding: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: 5px; /* Keep left margin */
    margin-right: auto; /* Push to left - added */
    clear: both;
    white-space: pre-line;
    text-align: left; /* Explicitly left-align text - added */
}


/* Adjust for mobile screens */
@media (max-width: 768px) {
    .responsive-svg {
            width: 95vw; /* Use most of the screen width on small devices */
            max-width: 100%; /* Fit within the screen */
    }

    #kundali_chat_input_area {
        flex-direction: column !important;
        align-items: stretch !important;
        padding-bottom: 10px !important;
        height: auto !important; /* Allow container to grow */
        min-height: 80px;
        overflow: visible !important; /* Ensure content isn't clipped */
    }

    .recalculate-height {
        height: auto !important;
        min-height: 80px !important;
        overflow: visible !important; /* Ensure content isn't clipped */
    }

    #kundali_chat_input {
        margin-bottom: 10px !important; /* Space below textarea */
        width: 100% !important; /* Full width */
    }

    #predefined_questions {
        padding: 10px 20px !important; /* Better touch target */
        font-size: 16px !important; /* Prevent iOS zoom */
        white-space: nowrap !important; /* Keep text on one line */
    }
 
    .chat_query {
        width: auto;
        max-width: 100%; 
        min-width: 100%;
        align-self: flex-end; /* Right alignment - changed from flex-start */
        background-color: #007bff; /* Added background color - changed from transparent */
        color: white;
        border-radius: 5px;
        padding: 5px;
        margin-top: 5px;
        margin-bottom: 5px;
        margin-right: 5px; /* Right margin instead of left - changed from margin-left */
        margin-left: auto; /* Push to right - added */
        clear: both;
        white-space: pre-line;
        text-align: right; /* Right-align text within the element - added */
    }

    .chat_response {
        width: 100%;
        align-self: flex-start; /* Left alignment - keep as is */
        background-color: rgb(191, 212, 244);
        color: black;
        border-radius: 5px;
        padding: 5px;
        margin-top: 5px;
        margin-bottom: 5px;
        margin-left: 5px; /* Keep left margin */
        margin-right: auto; /* Push to left - added */
        clear: both;
        white-space: pre-line;
        text-align: left; /* Explicitly left-align text - added */
    }

    #kundali_chat_div {
        height: auto;
        overflow: visible;
        margin-left: 2px;
        margin-right: 2px;
    }
    #kundali_chat_active {
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 5px;
    }
    #kundali_chat_history {
        overflow-y: auto;
        padding: 10px;
    }
}

.responsive-kundali-svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.chart-holder {
    height: fit-content; 
    margin:0px; 
    padding: 5px; 
    align-items: center; 
}


#kundali_div .col-lg-4 {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.progress {
    height: 20px;
    background-color: #f5f5f5;
    margin-top: 10px;
}

.progress-bar {
    background-color: #4CAF50;
    height: 100%;
}

.foreign-object-container {
    overflow: visible;
    font-size: 10px;
}

.svgChartElements {
    fill: transparent;
    stroke:orange;
    stroke-width:1.5
}

.svgTextElements {
    font-family:Arial;
    font-size:12px;
    text-anchor:start;
    width: 200px;
    fill: white;
}

.svgTextElementsCentred {
    font-family:Arial;
    color: orange;
    fill: orange;
    font-size:12px;
    text-anchor:middle; /* Centers text horizontally */
    dominant-baseline: middle; /* Centers text vertically */
}

.planets-in-houses {
    font-family:Arial, Helvetica, sans-serif; 
    display: flex;
    justify-content: center; /* Horizontal center */
    align-items: center;     /* Vertical center */
    height: 20px;            /* Make sure the p takes full height of parent */
    margin: 0;   
    font-size:10px; 
    overflow-wrap:break-word;
    word-wrap: break-word;
    color: yellow;
}

.planets-in-div-charts {
    color: yellow;
}

.transiting_planets_in_houses {
    font-family:'Times New Roman', Times, serif; 
    display: flex;
    justify-content: center; /* Horizontal center */
    align-items: center;     /* Vertical center */
    height: 30px;            /* Make sure the p takes full height of parent */
    margin: 0;  
    color: cornflowerblue;
    font-size:10px; 
    overflow-wrap:break-word;
    font-style: italic;
}


/* Modal styling */
  
      
.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Reduced from 10% to 5% */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    max-height: 150vh; /* Add max-height constraint */
    display: flex;
    flex-direction: column;
}

.modal-body {
    flex: 1;
    overflow: hidden; /* Prevent overflow */
    min-height: 0; /* Important for flex child */
}
      
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
      
#predefinedQuestionsList {
    list-style-type: none;
    padding: 0;
}
      
#predefinedQuestionsList li {
    padding: 10px;
    margin: 5px 0;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

#predefinedQuestionsList li:hover {
    background-color: #e0e0e0;
}

.styled-table {
    border-collapse: collapse;
    border: 1px solid orange;
    margin: 5px 0;
    font-size: 0.7em;
    font-family: sans-serif;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    color: black;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    table-layout: auto;
}

.styled-table thead tr {
    background: linear-gradient(135deg, rgb(219, 135, 32) 0%, rgb(152, 123, 7) 100%);
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.5px;
}

.styled-table th,
.styled-table td {
    padding: 2px 2px;
    font-family:Georgia, 'Times New Roman', Times, serif;    
    font-size: 14px;
    border: 1px solid gray;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
    background: linear-gradient(45deg, #f6eee4, white);
}

.styled-table tbody tr:hover {
    background-color: #F5D982;
}

.styled-table tfoot tr {
    background: linear-gradient(135deg, rgb(219, 135, 32) 0%, rgb(152, 123, 7) 100%);
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.5px;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid yellow;
}
.styled-table tbody tr.active-row {
    font-weight: bold;
    background-color: #F5D982;
}

.main-header {
    background-color: #f2f2f2;
    font-weight: bold;
}


.rashi-sign {
    height: 40px;
    width: 50px;
}
    
.styled_div {
    margin: 10px;
}

.kp-row {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Planet Cards Grid Layout */
.label-card {
    background: linear-gradient(45deg, #f7ae7e, #e6c0b6);
    color: white;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 80px;
    flex-shrink: 0;
}

.planet-label {
    font-weight: bold;
    font-size: 12px;
    padding: 6px 4px;
    background: linear-gradient(45deg, #FA812F, #FF6138);
    border-radius: 4px;
    margin-bottom: 6px;
    text-align: center;
    backdrop-filter: blur(10px);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-label:last-child {
    margin-bottom: 0;
}

.planets-container {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    align-items: stretch;
}


/* Planet Card Styling */
.planet-card {
    border-bottom: 1px solid #dddddd;
    background: linear-gradient(45deg, #f6eee4, white);
    color: black;
    border-right: 1px solid #e0e4e7;
    padding: 5px;
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.planet-card:hover {
    background-color: #f8f9fa;
}

.planet-card:last-child {
    border-right: none;
}

.planet-value {
    font-family:Georgia, 'Times New Roman', Times, serif;    
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    padding: 4px 4px;
    background: linear-gradient(45deg, #f6eee4, #f6eee4);
    border-radius: 4px;
    flex: 1;
    display: flex;
    align-items: center;
}

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

/* Responsive breakpoints */
@media (max-width: 768px) {
    .planet-card {
        border-right: none;
        border-bottom: 1px solid #e0e4e7;
        min-width: auto;
    }
    
    .planet-card:last-child {
        border-bottom: none;
    }
    
    .planets-container {
        flex-direction: column;
    }
    
    .label-card {
        width: 90px;
        padding: 8px 6px;
    }
    
    .planet-label {
        font-size: 11px;
        padding: 6px 4px;
    }
}


/* Table styling */
.planet-details {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px; /* Vertical spacing between rows */
    table-layout: fixed; /* Consistent column widths */
}

.planet-details tr {
    height: auto /* Fixed row height */
}

/* Column Widths */

.planet-details .detail-label {
    width: 25%; /* Fixed width for label column */
    padding-right: 5px;
    font-weight: bold;
    color: #555;
    white-space: nowrap; /* Prevent wrapping */
    text-align: center;
}

.planet-details .detail-spacer {
    width: 5%; /* Very small width for spacer */
    text-align: center;
    color: #999;
}

.planet-details .detail-value {
    width: 35%; /* Remaining space for values */
    padding-left: 5px;
    color: #333;
    word-break: break-word; /* Handle long content */
}

.planet-details .tenanted-value {
    width: 10%; /* Remaining space for values */
    padding-left: 5px;
    color: green;
    word-break: break-word; /* Handle long content */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .planet-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 864px) {
    .planet-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            padding: 10px;
    }
}

@media (max-width: 768px) {
    .planet-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            padding: 10px;
    }
}

@media (max-width: 480px) {
    .planet-grid {
            grid-template-columns: repeat(1, 1fr);
    }
}

.retrograde {
        color: #dc3545;
        font-weight: bold;
}
.direct {
        color: #28a745;
}

.planet-icon {
        width: 24px;
        height: 24px;
        margin-right: 8px;
}

.kp-script {
    background-color: #FDEAC3;
}


.show-chat {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.greg-datetime {
    margin: 5px;
    padding: 2px;
    color: yellow;
}

.dasha-table {
    color: black;
}

.dasha-column {
    color: black;
}

.bhukti-header {
    color: black;
}

.panchanga_display {
    padding: 4px;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1;
}

.kundali_display {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    padding: 2px 2px;
    border-bottom: 1px solid #ddd;
    column-gap: 2px;
    line-height: 0.8;
}

.key-text {
    display: flex;
    align-items: center;
    gap: 2px;
}

.kundali-basic-format {
    text-align: left;
    line-height: 0.8; 
}


.panchanga_notes {
    border-bottom: 1px solid transparent;
}


.vimshottari-dasha-container {
    display: flex;
    flex-wrap: wrap;
}
.vimshottari-table-container {
    flex: 1;
    min-width: 300px;
}

.horary-table-container {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    border: 1px solid #ccc;
    margin-top: 10px;
}


.horary_modal {
    color: white;
    
}

.horary-modal-content .wide-modal {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-image: url('../images/night-sky-background.jpg');
}


.wide-modal {
    background-image: url('../images/night-sky-background.jpg');
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 70%;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .wide-modal {
        background-image: url('../images/night-sky-background.jpg');
        margin: 5% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 90%;
        max-width: 1200px;
    }
}

.horary-table-container table.styled-table td {
    text-align: center;
    vertical-align: middle;
}

.horary-table-container table.styled-table td,
.horary-table-container table.styled-table th {
    padding: 4px 6px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.filter-group input {
    width: 125px;
}

.date-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.date-nav-btn {
    padding: 5px 10px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
}

.date-nav-btn:hover {
    background: linear-gradient(45deg, #FA812F, #b72f0d);
}

.date-input {
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.significatortd {
    font-size: 12px;
    white-space: nowrap; /* Keep content on one line */
    padding: 2px 2px;   /* Minimal padding */
    text-align: center;
}


/* Dasha Tab Styling */
.dasha-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1px;
}

.dasha-tab {
    padding: 5px 5px;
    background: linear-gradient(45deg, #f7ae7e, #e6c0b6);
    border: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-weight: normal;
}

.dasha-tab:hover {
    background: #ddd;
}

.dasha-tab.active {
    background: linear-gradient(45deg, #FA812F, #FF6138);
    color: white;
    font-weight: bold;
}

/* Tables Container */
.dasha-tables-container {
    position: relative;
    min-height: 100px; /* Adjust based on your table height */
    padding: 5px;
}

.dasha-table-container {
    display: none;
}

.dasha-table-container.active {
    display: block;
}

/* Selection Display */
.dasha-selection-display {
    margin-top: 1px;
    padding: 5px;
    background: linear-gradient(45deg, #FA812F, #FF6138);
    border-radius: 5px;
    font-size: 14px;
    color: white;
}

.dasha-selection-display span {
    font-weight: bold;
    color: white
}

.rp-tab {
    padding: 5px 5px;
    background: linear-gradient(45deg, #f7ae7e, #e6c0b6);
    border: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-weight: normal;
}

.rp-tab:hover {
    background: #ddd;
}

.rp-tab.active {
    background: linear-gradient(45deg, #FA812F, #FF6138);
    color: white;
    font-weight: bold;
}

.rp-table-container {
    display: none;
}

.rp-table-container.active {
    display: block;
}

/* Tab styling for Significators/KP Scripts section (moved from birth-chart.html) */
.signif-kp-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 10px;
}
.signif-kp-tab {
    padding: 5px 5px;
    background: linear-gradient(45deg, #f7ae7e, #e6c0b6);
    border: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-weight: normal;
    font-size: 16px;
}
.signif-kp-tab.active {
    background: linear-gradient(45deg, #FA812F, #FF6138);
    color: white;
    font-weight: bold;
}
.signif-kp-tab-content {
    display: none;
}
.signif-kp-tab-content.active {
    display: block;
}

.signif-kp-tab-container {
    display: none;
}

.signif-kp-tab-container.active {
    display: block; 
}

.chart-toggle-btn {
    padding: 8px 16px;
    background-color: #4a6da7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.chart-toggle-btn:hover {
    background-color: #3a5a8f;
}

.chart-container {
    transition: opacity 0.3s ease;
}

.chart-container_kundali_matching {
    transition: opacity 0.3s ease;
    flex: 0 0 auto;
    width: 420px; /* Or any width matching your original SVG size */
    text-align: center;
}
.chart-input-summary {
    font-size: 0.95rem;
    background-color: transparent;
    border: 2px solid orange
}

.chart-input-title {
    font-weight: 400;
    color: orange
}

.chart-input-data {
    font-weight: 300;
    color: white;
}

.planet-name-cell {
    width: 150px;
    min-width: 150px;
}

.sign-cell {
    width: 120px;
    text-align: left;
}

.sign-lon-cell {
    width: 120px;
    text-align: center;
}

.nakshatra-cell {
    width: 180px;
    text-align: left;
}

#birthPlace1Dropdown {
    box-sizing: border-box;
    background-color: white;
    border: 1px solid #ccc;
    padding: 4px 0;
    font-size: 15px;
}

#birthPlace2Dropdown {
    box-sizing: border-box;
    background-color: white;
    border: 1px solid #ccc;
    padding: 4px 0;
    font-size: 15px;
}

/* Generic Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(50px) scale(0.9);
    transition: all 0.3s ease;
    animation: popupSlideIn 0.3s ease-out forwards;
}

.popup-overlay.show .popup-container {
    transform: translateY(0) scale(1);
}

@keyframes popupSlideIn {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.popup-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.popup-body {
    padding: 20px;
    color: #555;
    line-height: 1.6;
    white-space: pre-line;
}

.popup-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.popup-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.popup-btn-primary {
    background-color: #007bff;
    color: white;
}

.popup-btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.popup-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.popup-btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.popup-btn-success {
    background-color: #28a745;
    color: white;
}

.popup-btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-1px);
}

.popup-btn-danger {
    background-color: #dc3545;
    color: white;
}

.popup-btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.popup-btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.popup-btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
}

/* Make anchor tags look exactly like buttons */
.popup-footer a.popup-btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    border: none; /* Match the button border style */
    padding: 10px 20px; /* Ensure same padding */
    border-radius: 6px; /* Ensure same border radius */
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

/* Remove default focus outline and add custom focus style */
.popup-footer a.popup-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Specific styles for each button type */
.popup-footer a.popup-btn-primary {
    background-color: #007bff;
    color: white;
}

.popup-footer a.popup-btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.popup-footer a.popup-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.popup-footer a.popup-btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.popup-footer a.popup-btn-success {
    background-color: #28a745;
    color: white;
}

.popup-footer a.popup-btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-1px);
}

.popup-footer a.popup-btn-danger {
    background-color: #dc3545;
    color: white;
}

.popup-footer a.popup-btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.popup-footer a.popup-btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.popup-footer a.popup-btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
}

/* Icon styles for different popup types */
.popup-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.popup-icon.success {
    background-color: #d4edda;
    color: #155724;
}

.popup-icon.error {
    background-color: #f8d7da;
    color: #721c24;
}

.popup-icon.warning {
    background-color: #fff3cd;
    color: #856404;
}

.popup-icon.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.popup-body-with-icon {
    display: flex;
    align-items: flex-start;
}

.popup-message {
    flex: 1;
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.demo-btn {
    margin: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.demo-btn:hover {
    transform: translateY(-2px);
}

.cardimages {
    width: 100%;
    aspect-ratio: 1 / 1; /* or any ratio matching your image */
    object-fit: cover;     /* or contain */
    border: none;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

/* Dark theme for the entire modal body */
.modal-dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    padding: 20px;
    margin: -15px -20px; /* Negative margin to fill the modal body */
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Compact astrology message */
.astrology-message-compact {
    background: linear-gradient(135deg, #2d1b69 10%, #1a1a2e 90%);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.golden-text-compact {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffc107);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    line-height: 1.1;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.golden-subtitle-compact {
    font-size: 0.75rem;
    color: #ffd700;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.welcome-text-compact {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-top: 10px;
}

.username-highlight {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Override modal styles to accommodate dark theme */
#popupOverlay .popup-message {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#popupOverlay .popup-body-with-icon {
    padding: 0 !important;
}

/* Ensure footer buttons are visible - FIXED */
#popupOverlay .popup-footer {
    background: #ffffff !important; /* Solid white background instead of transparent */
    border-top: 1px solid #ddd;
    padding: 15px 20px !important;
    margin: 0 -20px -15px -20px;
    border-radius: 0 0 12px 12px;
    position: relative;
    z-index: 10; /* Ensure footer stays on top */
}

/* Button styling adjustments - ENHANCED */
.popup-btn {
    margin: 5px !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 14px !important;
}

.popup-btn-primary {
    background: #007bff !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.popup-btn-primary:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4) !important;
}

.popup-btn-secondary {
    background: #6c757d !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3) !important;
}

.popup-btn-secondary:hover {
    background: #545b62 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-dark-theme {
        padding: 15px;
        margin: -10px -15px;
    }
    
    .golden-text-compact {
        font-size: 1.1rem;
    }
    
    .astrology-message-compact {
        padding: 12px;
    }
    
    .welcome-text-compact {
        font-size: 0.9rem;
    }
    
    .popup-btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
        margin: 3px !important;
    }
}