/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

/* =================================
   GLOBAL RESET & BASE STYLES
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f8ff;
    padding: 10px;
    font-size: 16px;
    margin: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    /* REMOVED: border-radius: 10px */
    box-shadow: none;
    /* REMOVED: box-shadow */
    overflow: hidden;
    width: 95%;
}

/* =================================
   TOP BAR
   ================================= */
.top-bar {
    background: linear-gradient(135deg, #3a4d5c 0%, #1d2a33 100%);
    color: #f5f5f5;
    padding: 25px 20px;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    /* REMOVED: box-shadow */
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Title content using ::before for layered depth */
.top-bar::before {
    content: "Jamakkol Prashna";
    color: #d4af37;
    font-size: 32px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    text-shadow: none;
    /* REMOVED: text-shadow */
    letter-spacing: 3px;
    position: relative;
    z-index: 2;
    font-weight: 700;
    text-transform: none;
}

/* Hide the original datetime display */
#datetime-display {
    display: none !important;
}

/* =================================
   MAIN LAYOUT
   ================================= */
.main-content {
    display: flex;
    padding: 30px 25px;
    gap: 35px;
    align-items: flex-start;
    min-height: 600px;
}

.chart-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.analysis-section {
    flex: 1;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 0;
    /* REMOVED: border-radius: 8px */
    border: 1px solid #ddd;
    height: fit-content;
    margin-top: 0px;
    align-self: flex-start;
}

/* =================================
   JAMAKKOL CHART
   ================================= */
.chart-wrapper {
    position: relative;
    padding: 90px;
    margin-bottom: 20px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.jamakkol-chart {
    position: relative;
    width: 500px;
    height: 500px;
    border: 3px solid #333333;
    background: #fffbf0;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    width: 100%;
    height: 100%;
}

.house {
    border: 1px solid #333333;
    padding: 6px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
}

.house-number {
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-weight: 300;
    font-size: 12px;
    color: #999;
}

.house-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    overflow: hidden;
    word-wrap: break-word;
}

.house-content:has(.planet-entry:nth-child(4)) {
    font-size: 10px;
}

.house-content:has(.planet-entry:nth-child(6)) {
    font-size: 9px;
}

/* =================================
   PLANET DISPLAY
   ================================= */
.planet-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
}

.planet-line {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 2px;
    font-weight: bold;
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.planet-line.inner {
    color: #d32f2f;
}

.planet-line.transit {
    color: #666;
}

/* =================================
   CENTER INFO
   ================================= */
.center-info {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #333333;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #333333;
}

.center-title {
    font-weight: bold;
    color: #333333;
    margin-bottom: 4px;
    font-size: 11px;
}

.center-details {
    text-align: center;
    line-height: 1.3;
}

.positions-table {
    font-size: 9px;
    color: #333333;
    margin-top: 4px;
    font-weight: 600;
}

/* =================================
   SVG CHART OVERRIDES - FIXED Inner Planets Red
   ================================= */

/* Force all SVG elements to use black borders */
svg rect {
    stroke: #333333 !important;
}

/* House numbers and non-planet text - BLACK */
svg text[text-anchor="end"] {
    fill: #333333 !important;
}

/* Force Jaama planet styling to black */
div[style*="background: #e3f2fd"],
div[style*="background:#e3f2fd"] {
    background: #f5f5f5 !important;
}

div[style*="border: 2px solid #1976d2"],
div[style*="border:2px solid #1976d2"] {
    border: 2px solid #333333 !important;
}

div[style*="color: #1976d2"],
div[style*="color:#1976d2"] {
    color: #333333 !important;
}

/* Force all absolute positioned Jaama boxes to black theme */
.chart-wrapper div[style*="position: absolute"] {
    background: #f5f5f5 !important;
    border: 2px solid #333333 !important;
    color: #333333 !important;
}

/* =================================
   INNER PLANETS - RED STYLING (UD, AR, KV, MD) - COMPREHENSIVE FIX
   ================================= */

/* 1. Target SVG text that should be RED for inner planets */
svg text[fill="#d32f2f"] {
    fill: #d32f2f !important;
}

/* 2. Target inner planets by font size in SVG */
svg text[font-size="13"] {
    fill: #d32f2f !important;
}

/* 3. Target inner planets in center panel by Y coordinates */
svg text[y="240"],
svg text[y="256"],
svg text[y="272"],
svg text[y="288"] {
    fill: #d32f2f !important;
}

/* 4. CRITICAL: Target SVG text in houses that contains inner planet abbreviations */
svg text[text-anchor="middle"][dominant-baseline="central"][font-size="13"] {
    fill: #d32f2f !important;
}

/* 5. Target any SVG text that contains inner planet patterns */
svg text[font-weight="bold"][text-anchor="middle"]:not([y="180"]):not([y="205"]) {
    /* This catches middle-aligned bold text that's not title/datetime */
}

/* 6. MOST IMPORTANT: Target by content - any text containing inner planet abbreviations */
/* This is done via JavaScript, but we ensure the CSS supports it */
svg text[data-planet-type="inner"] {
    fill: #d32f2f !important;
}

/* 7. Force HTML house content inner planets to red */
.planet-line.inner {
    color: #d32f2f !important;
}

.planet-line.transit {
    color: #000000 !important;
}

/* 8. Center panel inner planet positions - be more specific */
svg g:last-child text[font-size="9"][font-weight="600"] {
    fill: #d32f2f !important;
}

/* =================================
   KEEP THESE BLACK - Override any red styling
   ================================= */

/* Center title and metadata - BLACK */
svg text[y="180"] {
    fill: #333333 !important;
}

svg text[y="205"] {
    fill: #333333 !important;
}

/* Watermark - BLACK */
svg text[text-anchor="end"][y="590"] {
    fill: #333333 !important;
}

/* =================================
   ADDITIONAL TARGETING FOR GENERATED CONTENT
   ================================= */

/* If your JavaScript generates specific classes or attributes, target them */
.inner-planet-text {
    color: #d32f2f !important;
    fill: #d32f2f !important;
}

.transit-planet-text {
    color: #333333 !important;
    fill: #333333 !important;
}

/* Target any text element that might contain UD, AR, KV, MD */
svg text[font-family*="Inter"] {
    /* Default to checking content via JavaScript */
}

/* =================================
   CSS CLASSES FOR JAVASCRIPT TO USE
   ================================= */

/* Classes that your JavaScript can apply to ensure proper coloring */
.svg-inner-planet {
    fill: #d32f2f !important;
    color: #d32f2f !important;
}

.svg-transit-planet {
    fill: #333333 !important;
    color: #333333 !important;
}

.svg-title-text {
    fill: #333333 !important;
    color: #333333 !important;
}

.svg-house-number {
    fill: #333333 !important;
    color: #333333 !important;
}

/* =================================
   JAAMA PLANETS - SHARP RECTANGLES, NO SHADOWS
   ================================= */
.jaama-planet {
    position: absolute;
    background: #f5f5f5;
    border: 2px solid #333333;
    padding: 6px 10px;
    border-radius: 0;
    /* REMOVED: border-radius: 6px */
    font-size: 11px;
    font-weight: bold;
    color: #333333;
    text-align: center;
    min-width: 65px;
    max-width: 80px;
    box-shadow: none;
    /* REMOVED: box-shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jaama-planet-line {
    font-size: 10px;
    text-align: center;
    line-height: 1.1;
    color: #333333;
    font-weight: bold;
}

.jaama-indicators {
    font-size: 8px;
    color: #d32f2f;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    margin-top: 1px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0;
    /* REMOVED: border-radius: 2px */
    padding: 1px 2px;
}

.jaama-planet:has(.jaama-indicators) {
    padding: 4px 6px 2px 6px;
}

.house-indicator.bdk {
    font-size: 9px;
    color: #d32f2f;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0;
    /* REMOVED: border-radius: 2px */
    padding: 1px 3px;
    margin-top: 2px;
}

/* =================================
   ANALYSIS SECTION - SHARP RECTANGLES, NO SHADOWS
   ================================= */
.analysis-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #333333;
    padding-bottom: 3px;
}

.analysis-grid {
    display: block;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: white;
    border-radius: 0;
    /* REMOVED: border-radius: 4px */
    border-left: 2px solid #333333;
    box-shadow: none;
    /* REMOVED: box-shadow */
    margin-bottom: 4px;
    font-size: 12px;
}

.analysis-item strong {
    color: #333;
    font-weight: bold;
    font-size: 12px;
    flex: 1;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-value {
    color: #333333;
    font-weight: bold;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
    min-width: 60px;
}

/* Notes Section - SHARP RECTANGLES */
.notes-section {
    background: #fff9c4;
    border: 2px solid #fbc02d;
    border-radius: 0;
    /* REMOVED: border-radius: 8px */
    padding: 15px;
    margin-top: 15px;
    min-height: 120px;
}

.notes-title {
    font-weight: bold;
    color: #f57f17;
    margin-bottom: 10px;
    font-size: 14px;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 0;
    /* REMOVED: border-radius: 4px */
    padding: 8px;
    font-size: 12px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

/* =================================
   PREDICTION SECTION - SHARP RECTANGLES, NO SHADOWS
   ================================= */
.prediction-section {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4f8 50%, #f0f8ff 100%);
    color: #333;
    padding: 25px;
    border-radius: 0;
    /* REMOVED: border-radius: 12px */
    border: 2px solid #333333;
    box-shadow: none;
    /* REMOVED: box-shadow */
    margin-top: 20px;
    display: none;
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.prediction-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #333333 0%, #333333 50%, #333333 100%);
    border-radius: 0;
    /* REMOVED: border-radius: 12px 12px 0 0 */
}

.prediction-section.show {
    display: block;
}

.prediction-title {
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
    border-bottom: none;
    padding: 25px;
    color: #1a4f5f;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 50%, #d1e7dd 100%);
    margin: -25px -25px 20px -25px;
    border-radius: 0;
    /* REMOVED: border-radius: 12px 12px 0 0 */
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    text-shadow: none;
    /* REMOVED: text-shadow */
    letter-spacing: 1px;
    font-size: 0;
}

.prediction-title::before {
    content: "Jamakkol Prediction";
    position: relative;
    z-index: 2;
    font-size: 24px;
    display: block;
}

.prediction-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            #333333 0%,
            #333333 25%,
            #333333 50%,
            #333333 75%,
            #333333 100%);
    animation: borderFlow 3s ease-in-out infinite;
}

@keyframes borderFlow {

    0%,
    100% {
        background-position: 0% 50%;
        background-size: 200% 100%;
    }

    50% {
        background-position: 100% 50%;
        background-size: 200% 100%;
    }
}

.category-display {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #e3f2fd 100%);
    color: #1565c0;
    padding: 15px;
    border-radius: 0;
    /* REMOVED: border-radius: 8px */
    border: 2px solid #333333;
    box-shadow: none;
    /* REMOVED: box-shadow */
    text-shadow: none;
    /* REMOVED: text-shadow */
}

.verdict-card {
    background: linear-gradient(135deg, #fafcff 0%, #f8fbff 50%, #fafcff 100%);
    padding: 25px;
    border-radius: 0;
    /* REMOVED: border-radius: 10px */
    text-align: center;
    border: 3px solid #333333;
    box-shadow: none;
    /* REMOVED: box-shadow */
    position: relative;
    overflow: hidden;
}

.verdict-text {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #4caf50;
    position: relative;
    z-index: 1;
}

.verdict-text.yes {
    color: #4caf50;
}

.verdict-text.no {
    color: #f44336;
}

.verdict-text.uncertain {
    color: #ff9800;
}

.confidence-level {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2c5f6f;
    font-weight: 600;
    text-shadow: none;
    /* REMOVED: text-shadow */
    position: relative;
    z-index: 1;
}

.prediction-score {
    font-size: 14px;
    color: #4a6741;
    font-weight: 500;
    text-shadow: none;
    /* REMOVED: text-shadow */
    position: relative;
    z-index: 1;
}

/* =================================
   BUTTONS & SHARE SECTIONS - SHARP RECTANGLES, NO SHADOWS
   ================================= */
.chart-share-section {
    margin-top: 20px;
    text-align: center;
    border-top: 2px solid #e3f2fd;
    padding-top: 15px;
}

.enhanced-share-section {
    margin-top: 15px;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    display: none;
}

.chart-share-btn,
.enhanced-share-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 0;
    /* REMOVED: border-radius: 25px */
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: none;
    /* REMOVED: box-shadow */
    margin: 0 10px;
    min-width: 140px;
    justify-content: center;
}

.chart-share-btn:hover,
.enhanced-share-btn:hover {
    background: linear-gradient(135deg, #20b358 0%, #0f7a6c 100%);
    transform: translateY(-2px);
    box-shadow: none;
    /* REMOVED: box-shadow */
}

.chart-share-btn.save {
    background: linear-gradient(135deg, #333333 0%, #333333 100%);
}

.chart-share-btn.save:hover {
    background: linear-gradient(135deg, #333333 0%, #333333 100%);
}

.chart-share-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    /* REMOVED: box-shadow */
}

.enhanced-share-btn {
    background: linear-gradient(135deg, #333333 0%, #333333 100%);
    padding: 10px 20px;
    margin: 5px;
    min-width: auto;
}

.enhanced-share-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #333333 100%);
    transform: translateY(-1px);
    box-shadow: none;
    /* REMOVED: box-shadow */
}

/* =================================
   CONTROLS PANEL - SHARP RECTANGLES
   ================================= */
.controls-panel {
    background: #f8f9fa;
    padding: 20px;
    border-top: 2px solid #ddd;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.controls-header h3 {
    font-size: 20px;
}

.now-button,
.btn-calculate {
    background: #333333;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 0;
    /* REMOVED: border-radius: 6px */
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
}

.now-button:hover,
.btn-calculate:hover {
    background: #333333;
}

.btn-calculate {
    background: #4caf50;
}

.btn-calculate:hover {
    background: #45a049;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    min-width: 80px;
    color: #333;
    font-size: 16px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 0;
    /* REMOVED: border-radius: 5px */
    font-size: 16px;
    min-width: 130px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #333333;
    outline: none;
}

/* City Search - SHARP RECTANGLES */
.city-search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.city-search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 0;
    /* REMOVED: border-radius: 5px */
    font-size: 16px;
}

.city-search-input:focus {
    border-color: #333333;
    outline: none;
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #333333;
    border-top: none;
    border-radius: 0;
    /* REMOVED: border-radius: 0 0 5px 5px */
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

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

.city-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-option:hover {
    background: #f0f8ff;
}

.city-option:last-child {
    border-bottom: none;
}

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

.city-details {
    font-size: 12px;
    color: #666;
    text-align: right;
}

.timezone-display {
    background: #e8f5e8;
    padding: 8px 12px;
    border-radius: 0;
    /* REMOVED: border-radius: 4px */
    font-size: 14px;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    margin-left: 10px;
}

/* Question Section - SHARP RECTANGLES */
.question-section {
    background: #fff3e0;
    padding: 15px;
    border-radius: 0;
    /* REMOVED: border-radius: 8px */
    border: 1px solid #ffb74d;
    margin-bottom: 15px;
}

.question-title {
    font-weight: bold;
    color: #ef6c00;
    margin-bottom: 10px;
    font-size: 16px;
}

.question-category-group {
    flex: 1;
    min-width: 250px;
}

.category-select {
    min-width: 200px;
}

/* Advanced Toggle - SHARP RECTANGLES */
.advanced-toggle {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.toggle-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0;
    /* REMOVED: border-radius: 4px */
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
}

.toggle-button:hover {
    background: #5a6268;
}

.advanced-inputs {
    display: none;
    margin-top: 10px;
}

.advanced-inputs.show {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* =================================
   MOBILE RESPONSIVENESS
   ================================= */
@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .main-content {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }

    .chart-section {
        width: 100%;
        overflow: hidden;
    }

    .chart-wrapper {
        padding: 20px 10px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .jamakkol-chart {
        width: 280px;
        height: 280px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vw - 40px);
    }

    .center-info {
        font-size: 8px;
        padding: 4px;
    }

    .center-title {
        font-size: 9px;
    }

    .positions-table {
        font-size: 7px;
    }

    .house-content {
        font-size: 10px;
    }

    .house-content:has(.planet-entry:nth-child(4)) {
        font-size: 8px;
    }

    .house-content:has(.planet-entry:nth-child(6)) {
        font-size: 7px;
    }

    .planet-line {
        font-size: 9px;
    }

    .jaama-planet {
        min-width: 50px;
        max-width: 60px;
        font-size: 9px;
        padding: 4px 6px;
    }

    .jaama-planet-line {
        font-size: 8px;
    }

    .analysis-section {
        width: 100%;
        margin-top: 0;
    }

    .prediction-section {
        max-width: 100%;
        margin: 15px 0;
        padding: 15px;
    }

    .prediction-title {
        font-size: 18px;
        padding: 15px;
        margin: -15px -15px 15px -15px;
    }

    .prediction-title::before {
        font-size: 18px;
    }

    .verdict-text {
        font-size: 28px;
    }

    .top-bar {
        font-size: 24px;
        padding: 15px 10px;
    }

    .top-bar::before {
        font-size: 24px;
    }

    .controls-panel {
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .form-group label {
        min-width: auto;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        min-width: auto;
    }

    .city-search-container {
        min-width: auto;
        width: 100%;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .jamakkol-chart {
        width: 250px;
        height: 250px;
        max-width: calc(100vw - 30px);
        max-height: calc(100vw - 30px);
    }

    .chart-wrapper {
        padding: 15px 5px;
    }

    .main-content {
        padding: 10px;
    }

    .house-content {
        font-size: 9px;
    }

    .house-content:has(.planet-entry:nth-child(4)) {
        font-size: 7px;
    }

    .house-content:has(.planet-entry:nth-child(6)) {
        font-size: 6px;
    }

    .planet-line {
        font-size: 8px;
    }

    .jaama-planet {
        min-width: 45px;
        max-width: 55px;
        font-size: 8px;
        padding: 3px 5px;
    }

    .jaama-planet-line {
        font-size: 7px;
    }

    .center-info {
        font-size: 7px;
        padding: 3px;
    }

    .center-title {
        font-size: 8px;
    }

    .positions-table {
        font-size: 6px;
    }
}

/* Mobile chart image specific styles */
.mobile-chart-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mobile-chart-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* =================================
   PRINT STYLES - SHARP RECTANGLES, NO SHADOWS
   ================================= */
@media print {
    * {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        background: white !important;
        font-size: 12px;
        color: black !important;
        margin: 0;
        padding: 10px;
        font-family: Arial, sans-serif;
    }

    .container {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: white !important;
    }

    .top-bar {
        background: #333333 !important;
        color: white !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        text-align: center;
        padding: 10px !important;
        margin-bottom: 15px;
        font-size: 16px !important;
    }

    .controls-panel,
    .chart-share-section,
    .enhanced-share-section {
        display: none !important;
    }

    .main-content {
        flex-direction: column !important;
        padding: 10px !important;
        gap: 15px !important;
        min-height: auto !important;
    }

    .chart-section {
        page-break-inside: avoid;
        margin-bottom: 15px;
        align-items: flex-start !important;
    }

    .chart-wrapper {
        padding: 30px !important;
        margin-bottom: 10px !important;
    }

    .jamakkol-chart {
        width: 350px !important;
        height: 350px !important;
        border: 2px solid black !important;
        background: white !important;
    }

    .center-info {
        background: rgba(255, 255, 255, 0.95) !important;
        border: 1px solid black !important;
        color: black !important;
        font-size: 8px !important;
    }

    .center-title {
        color: black !important;
        font-size: 9px !important;
    }

    .positions-table {
        color: black !important;
        font-size: 7px !important;
    }

    .prediction-section {
        background: #f0f0f0 !important;
        border: 2px solid black !important;
        color: black !important;
        page-break-inside: avoid;
        margin: 15px 0 !important;
        max-width: 100% !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
        box-shadow: none !important;
        /* REMOVED: shadows for print */
    }

    .prediction-title {
        color: black !important;
        border-bottom: 2px solid black !important;
        font-size: 16px !important;
        background: #e0e0e0 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .category-display {
        background: #e0e0e0 !important;
        color: black !important;
        border: 1px solid black !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .verdict-card {
        background: white !important;
        border: 2px solid black !important;
        color: black !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
        box-shadow: none !important;
        /* REMOVED: shadows for print */
    }

    .verdict-text {
        color: black !important;
        font-size: 28px !important;
    }

    .verdict-text.yes::after {
        content: " ✓";
        color: black !important;
    }

    .verdict-text.no::after {
        content: " ✗";
        color: black !important;
    }

    .confidence-level,
    .prediction-score {
        color: black !important;
    }

    .analysis-section {
        background: white !important;
        border: 1px solid black !important;
        page-break-inside: avoid;
        margin-top: 15px;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .analysis-title {
        color: black !important;
        border-bottom: 2px solid black !important;
        font-size: 16px !important;
    }

    .analysis-item {
        background: white !important;
        border: 1px solid #ccc !important;
        border-left: 3px solid black !important;
        box-shadow: none !important;
        margin-bottom: 5px !important;
        padding: 8px !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .analysis-item strong {
        color: black !important;
        font-size: 12px !important;
    }

    .analysis-value {
        color: black !important;
        font-size: 12px !important;
    }

    .jaama-planet {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
        box-shadow: none !important;
        font-size: 10px !important;
        padding: 4px 6px !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .jaama-planet-line {
        color: black !important;
        font-size: 10px !important;
    }

    .house {
        border: 1px solid black !important;
        background: white !important;
        padding: 4px !important;
    }

    .house-number {
        color: black !important;
        font-size: 10px !important;
    }

    .house-content {
        font-size: 10px !important;
    }

    .planet-line {
        color: black !important;
    }

    .planet-line.inner,
    .planet-line.transit {
        color: black !important;
        font-weight: bold !important;
    }

    .notes-section {
        background: #f8f8f8 !important;
        border: 1px solid black !important;
        color: black !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .notes-title {
        color: black !important;
    }

    .notes-textarea {
        background: white !important;
        border: 1px solid black !important;
        color: black !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }

    .house-indicator.bdk,
    .jaama-indicators {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        border-radius: 0 !important;
        /* REMOVED: rounded corners for print */
    }
}