/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #663399, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

/* Form Section */
.form-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #663399;
    box-shadow: 0 0 0 3px rgba(102, 51, 153, 0.1);
}

/* Autocomplete */
.autocomplete {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

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

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #663399, #9d4edd);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 51, 153, 0.3);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.chart-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.chart-btn {
    padding: 8px 16px;
    background: #726f5f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.chart-btn:hover {
    background: #5a5649;
}

.chart-btn.active {
    background: #ff1493;
}

/* ================================
   CHART2 DESIGN STYLES
   ================================ */
.Chart_container__hGMM_ {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    position: relative;
    aspect-ratio: 1/1;
    border: 1px solid #726f5f;
    background-color: #ffffdc;
    max-width: 600px;
    margin: 0 auto;
}

.Chart_center__t5Bjm {
    width: 50%;
    height: 50%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 25%;
    top: 25%;
    font-size: 13px;
    color: black;
    text-align: center;
}

.Chart_center__t5Bjm p {
    margin-bottom: 8px;
    margin-left: -15px;
}

.Chart_rowChild__vZWAK {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.Chart_child__MOR9F {
    flex: 1;
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2px 0 2px 5px;
    position: relative;
    font-size: 14px;
    border-right: 1px solid #726f5f;
    border-bottom: 1px solid #726f5f;
}

.Chart_houseText__KXxNs {
    font-family: Lato, sans-serif !important;
    font-weight: 500;
    line-height: 1.4;
    color: red;
    cursor: pointer;
}

.Chart_houseText__KXxNs:hover {
    color: blue !important;
}

.Chart_grahaText__kMa86 {
    font-family: Lato, sans-serif !important;
    font-weight: 500;
    line-height: 1.4;
    color: black;
    cursor: pointer;
}

.Chart_grahaText__kMa86:hover {
    color: #ff1493 !important;
}

/* Remove borders for center cells */
.Chart_rowChild__vZWAK:nth-child(2) .Chart_child__MOR9F:nth-child(2) {
    border-right: none !important;
    border-bottom: none !important;
}

.Chart_rowChild__vZWAK:nth-child(2) .Chart_child__MOR9F:nth-child(3) {
    border-left: none !important;
    border-bottom: none !important;
}

.Chart_rowChild__vZWAK:nth-child(3) .Chart_child__MOR9F:nth-child(2) {
    border-right: none !important;
    border-top: none !important;
}

.Chart_rowChild__vZWAK:nth-child(3) .Chart_child__MOR9F:nth-child(3) {
    border-left: none !important;
    border-top: none !important;
}

.Chart_child__MOR9F:last-child {
    border-right: none !important;
}

.Chart_rowChild__vZWAK:last-child .Chart_child__MOR9F {
    border-bottom: none !important;
}

/* Info Section */
.info-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 14px;
}

.planet-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.planet-item {
    padding: 8px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #ff1493;
}

.planet-name {
    font-weight: bold;
    color: #333;
}

.planet-details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Loading & Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    font-size: 1.2rem;
    color: #666;
}

.error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .Chart_container__hGMM_ {
        max-width: 100%;
    }
}

/* Dig Bala Tables Styles */
.dig-bala-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.dig-bala-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.dig-bala-table, .powerful-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dig-bala-table th, .dig-bala-table td,
.powerful-table th, .powerful-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

.dig-bala-table th, .powerful-table th {
    background: #663399;
    color: white;
    font-weight: 600;
}

.dig-bala-table .yes {
    background: #d1ffd1;
    font-weight: bold;
    color: #2e7d32;
}

.dig-bala-table .no {
    background: #ffd1d1;
    color: #c62828;
}

.powerful-table tr:nth-child(even) {
    background: #f8f8f8;
}

.rule-mark {
    font-size: 18px;
}

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
}

/* Logo Styles */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
}

.site-logo {
    width: 120px;
    height: auto;
    display: block;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .logo-container {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .site-logo {
        margin: 0 auto;
    }
}