
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        body {
            background-color: transparent;
            min-height: 100vh;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 20px;
            /* Disable Text Selection Globally */
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        /* Essential: Allow typing in inputs */
        input,
        textarea {
            -webkit-user-select: text;
            user-select: text;
        }

        .card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            width: 100%;
            max-width: 450px;
            position: relative;
        }

        h1 {
            text-align: center;
            margin-bottom: 25px;
            font-size: 1.5rem;
            color: #1f2937;
            font-weight: 500;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            /* 600 -> 500 */
            color: #374151;
            font-size: 0.95rem;
        }

        input[type="date"],
        input[type="number"] {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid #d1d5db;
            font-size: 1rem;
            transition: border-color 0.2s, box-shadow 0.2s;
        }



        input[type="date"]:focus,
        input[type="number"]:focus {
            outline: none;
            border-color: #8b5cf6;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
        }

        input[type="date"] {
            color: #9ca3af;
            /* Default (Placeholder) Color - Gray */
        }

        input[type="date"].has-value,
        input[type="date"]:focus,
        input[type="date"]:invalid {
            color: #374151;
            /* Filled or Focus Color - Dark */
        }

        .date-row {
            display: flex;
            gap: 10px;
        }

        .date-row input {
            text-align: center;
        }

        /* Specific Widths for Split Inputs - Aesthetic Adjustment */
        /* Specific Widths for Split Inputs - Aesthetic Adjustment */

        /* 1. Birth Date Row (Upper) - Visual Order: Short -> Medium -> Long */
        .birth-date-row input:nth-of-type(1) {
            flex: 0.8;
        }

        .birth-date-row input:nth-of-type(2) {
            flex: 1.3;
        }

        .birth-date-row input:nth-of-type(3) {
            flex: 2;
        }

        /* 2. Target Date Row (Lower) - Equal Widths (Restored) */
        .date-row:not(.birth-date-row) input {
            flex: 1;
        }

        /* Largest */

        .btn-calculate {
            width: 100%;
            background: #8b5cf6;
            color: #ffffff;
            font-weight: 500;
            /* 600 -> 500 */
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 1.05rem;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 10px;
        }

        .btn-calculate:hover {
            background: #7c3aed;
        }

        .result-container {
            margin-top: 25px;
            padding-top: 20px;
            border-top: 2px solid #f3f4f6;
            text-align: center;
            display: none;
            /* JS ile açılacak */
        }

        .result-grid {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 10px;
        }

        .result-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .result-label {
            font-size: 0.9rem;
            color: #6b7280;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .result-value {
            font-size: 1.6rem;
            font-weight: 600;
            color: #1f2937;
        }

        /* Renkler - Canlı Tonlar */
        .val-year {
            color: #d946ef;
        }

        /* Fuşya */
        .val-month {
            color: #ec4899;
        }

        /* Pembe */
        .val-day {
            color: #8b5cf6;
        }

        /* Mor */

        .divider {
            width: 1px;
            height: 40px;
            background: #e5e7eb;
        }

        /* Inputlarda yukarı aşağı okları kaldırma (Chrome/Safari/Edge/Opera) */
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .app-logo {
            display: block;
            margin: 0 auto 15px auto;
            max-width: 150px;
            height: auto;
        }

        /* Settings Menu & Modal Styles */
        .settings-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            cursor: pointer;
            z-index: 100;
            padding: 10px;
        }

        .hamburger-icon {
            width: 30px;
            height: 24px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .bar {
            width: 100%;
            height: 4px;
            background-color: #6b7280;
            /* Daha yumuşak gri (Cool Gray 500) */
            border-radius: 4px;
        }

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 200;
            align-items: flex-start;
            padding-top: 80px;
            justify-content: center;
        }

        .shake {
            animation: shake 0.5s;
            border-color: #ef4444 !important;
        }

        @keyframes shake {
            0% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-5px);
            }

            50% {
                transform: translateX(5px);
            }

            75% {
                transform: translateX(-5px);
            }

            100% {
                transform: translateX(0);
            }
        }



        .modal-content {
            background: white;
            padding: 24px;
            border-radius: 12px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 12px;
        }

        .modal-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #111827;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #6b7280;
        }

        .lang-options {
            display: flex;
            gap: 12px;
            margin-top: 10px;
        }

        .lang-select {
            padding: 10px 15px;
            font-size: 1rem;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            width: 100%;
            background-color: #fff;
            cursor: pointer;
            transition: border-color 0.2s;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1.5em 1.5em;
        }

        .lang-select:focus {
            outline: none;
            border-color: #4f46e5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        /* ENERGY BUTTONS & SECTIONS */
        .energy-btn-group {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .btn-energy {
            flex: 1;
            padding: 10px;
            font-size: 0.95rem;
            border: 1px solid #d1d5db;
            background: #fff;
            color: #374151;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
        }

        .btn-energy:hover {
            background: #fdf4ff;
            border-color: #d946ef;
            color: #d946ef;
            box-shadow: 0 2px 4px rgba(217, 70, 239, 0.1);
        }

        .btn-energy.active {
            background: #eef2ff;
            border-color: #8b5cf6;
            color: #8b5cf6;
        }

        .btn-print {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #eaecf0;
            /* Çok az daha koyu, net gri */
            color: #374151;
            /* Daha belirgin koyu gri */
            font-weight: 300;
            /* İnce font */
            padding: 10px;
            border: 1px solid #d0d5dd;
            /* Çerçeve de uyumlu */
            border-radius: 8px;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-print:hover {
            background: #d1d5db;
            /* Hover belirginleşti */
            color: #111827;
        }

        .reading-section,
        .library-section {
            display: none;
            margin-top: 20px;
            text-align: left;
            border-top: 1px solid #e5e7eb;
            padding-top: 20px;
            /* Disable Text Selection */
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .reading-intro {
            font-size: 0.9rem;
            font-style: italic;
            color: #6b7280;
            margin-bottom: 20px;
            padding: 10px;
            background: #f9fafb;
            border-radius: 8px;
        }

        .reading-item {
            margin-bottom: 20px;
            border: 1px solid #f3f4f6;
            border-radius: 8px;
            padding: 15px;
            background: #fff;
        }

        .reading-title {
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .reading-badge-year {
            color: #d946ef;
            font-size: 0.85em;
        }

        .reading-badge-month {
            color: #ec4899;
            font-size: 0.85em;
        }

        .reading-badge-day {
            color: #8b5cf6;
            font-size: 0.85em;
        }

        /* LIBRARY STYLES */
        .lib-item {
            border-bottom: 1px solid #e5e7eb;
        }

        .lib-header {
            padding: 12px 0;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 500;
            color: #374151;
        }

        .lib-header:hover {
            color: #111827;
        }

        .lib-content {
            display: none;
            padding-bottom: 15px;
            font-size: 0.95rem;
            color: #4b5563;
        }

        .lib-meta {
            margin-top: 10px;
            font-size: 0.9rem;
        }

        .lib-meta strong {
            color: #374151;
        }

        @media print {

            @page {
                margin: 0 1cm;
            }

            /* Hide detail view & controls */
            #detailView,
            #settingsBtn,
            .modal-overlay,
            .btn-back,
            .btn-energy,
            .btn-calculate,
            .btn-print {
                display: none !important;
            }

            /* Optimize main app for printing */
            /* Optimize main app for printing */
            body {
                background: white;
                margin: 0.5cm 1cm !important;
                /* Reduced margin */
                padding: 0;
                display: block !important;
                min-height: auto;
                height: auto;
            }

            .card {
                box-shadow: none;
                border: none;
                max-width: 100%;
                padding: 0;
                margin: 0;
                min-height: 275mm;
                /* Force full height for footer */
                display: flex !important;
                flex-direction: column !important;
            }

            /* Header Layout for Print */
            #mainApp {
                position: relative;
                margin-top: 0;
                flex-grow: 1;
                /* Push footer down */
            }

            h1 {
                text-align: center;
                margin-bottom: 20px;
                font-size: 1.4rem;
            }

            /* Fix Logo Overlap on Print (User Request) */
            /* Restrict birth date width to allow space for logo on the right */
            .birth-date-row {
                width: 65% !important;
            }

            /* Logo Positioning - Aligned with the empty space */
            .app-logo {
                position: absolute;
                top: 45px;
                right: 0;
                left: auto;
                width: 110px;
                height: auto;
                margin: 0;
                z-index: 50;
            }

            /* Hide Limit Message in Print (Requested) */
            #limitMessage {
                display: none !important;
            }

            #printFooterContainer {
                display: block !important;
                margin-top: auto;
                text-align: center;
                font-size: 0.75rem;
                color: #6b7280;
                padding: 10px 0;
                border-top: 1px solid #fca5a5;
                width: 100%;
            }

            /* Force input values to be visible in print */
            input[type="number"] {
                color: #000000 !important;
                font-weight: 600 !important;
                -webkit-text-fill-color: #000000 !important;
            }

            /* Adjust flex widths for First/Second inputs in Print (User Request) */
            /* Force "Small - Medium - Large" Visual Rhythm */
            .birth-date-row input:nth-of-type(1) {
                flex: 0.7 !important;
            }

            .birth-date-row input:nth-of-type(2) {
                flex: 1.4 !important;
            }

            /* Year (3rd) stays largest (flex: 2 default) or force it if needed */
            .birth-date-row input:nth-of-type(3) {
                flex: 2 !important;
            }
        }

        .lang-flag {
            font-size: 1.2rem;
        }

        /* Mobile-specific adjustments for History Header */
        @media (max-width: 480px) {
            .history-header span {
                font-size: 0.65rem !important;
                /* Smaller size to fit on one line */
                white-space: nowrap;
                /* Force single line */
            }
        }

        /* History Log Styles */
        .history-container {
            margin-top: 25px;
            display: none;
            /* Initially hidden */
        }

        .history-divider {
            height: 1px;
            /* İnce çizgi */
            background-color: #ef4444;
            /* Kırmızı */
            margin: 15px 0;
            border: none;
        }

        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            /* Dikey ortala */
            font-weight: 500;
            margin-bottom: 10px;
            font-size: 0.9rem;
            color: #374151;
            padding: 0 10px;
        }

        .clear-btn {
            background: none;
            border: none;
            color: #ef4444;
            cursor: pointer;
            font-size: 0.8em;
            text-decoration: underline;
            padding: 0;
            margin-left: 5px;
            vertical-align: middle;
        }

        .clear-btn:hover {
            color: #dc2626;
        }

        /* Başlıkların değerlerle hizalanması için */
        .history-header span:last-child {
            width: 110px;
            /* Genişletildi: 30+10+30+10+30 = 110px */
            text-align: center;
        }

        .history-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .history-item {
            display: flex;
            justify-content: space-between;
            font-size: 0.95rem;
            color: #1f2937;
        }

        .history-values {
            display: flex;
            gap: 10px;
            /* Gap azaltıldı, width arttırıldı */
            width: 110px;
            /* Genişletildi: 30+10+30+10+30 = 110px */
            justify-content: center;
            /* Ortala */
        }

        .hist-val {
            color: #d946ef;
            /* Matches existing colors */
            font-weight: 500;
            width: 30px;
            /* 20px -> 30px (11/2 sığsın diye) */
            text-align: center;
        }



        .hist-val:nth-child(2) {
            color: #ec4899;
        }

        .hist-val:nth-child(3) {
            color: #8b5cf6;
        }

        .limit-message {
            margin-top: 10px;
            text-align: center;
            font-size: 0.85rem;
            color: #9ca3af;
            /* Silik görünüm */
            display: none;
        }


        .about-section {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #e5e7eb;
            font-size: 0.9rem;
            color: #4b5563;
            line-height: 1.6;
        }

        .about-title {
            font-weight: 600;
            color: #111827;
            margin-bottom: 8px;
            display: block;
        }

        .highlight-dark {
            color: #414b5a;
            /* Mid-tone: Between Gray-600 and Gray-700 */
            font-weight: 500;
        }

        .about-signature {
            display: block;
            margin-top: 12px;
            color: #9ca3af;
            font-size: 0.9rem;
            /* Diğer yazılarla aynı boyut */
            text-align: left;
            /* Sola yasla */
        }

        .date-hint {
            color: #6b7280;
            font-weight: 400;
            margin-left: 4px;
        }

        @media (max-width: 480px) {
            .date-hint {
                display: block;
                /* Force new line on mobile */
                margin-left: 0;
                margin-top: 2px;
                font-size: 0.9em;
            }
        }

        /* Back Button Style */
        .btn-back {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
            color: #4b5563;
            /* Gray-600 */
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .btn-back:hover {
            color: #111827;
            /* Gray-900 */
        }

        /* INLINE CUSTOM ALERT */


        /* Shake Animation for Invalid Input */
        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-5px);
            }

            75% {
                transform: translateX(5px);
            }
        }

        .shake {
            animation: shake 0.3s;
            border-color: #ef4444 !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
        }

        .app-logo {
            max-width: 150px;
            display: block;
            margin: 0 auto 20px auto;
        }
    