/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Hapus semua debug borders yang menyebabkan garis merah */
    border: none !important;
    outline: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================
   MAIN HEADER
   ========================================== */

.main-header {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-container img {
    height: 40px;
    width: auto;
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: #ffc107;
}

.menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* ==========================================
   PAGE CONTAINER & LAYOUT FIXES
   ========================================== */

.page-container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

.calendar-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* ==========================================
   SIDEBAR MENU (MOBILE)
   ========================================== */

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    transition: left 0.3s ease;
    z-index: 2000;
    padding: 20px;
}

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

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-logo {
    height: 35px;
}

.close-menu {
    background: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
}

.menu-links {
    list-style: none;
}

.menu-links li {
    margin-bottom: 20px;
}

.menu-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.menu-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-open {
    overflow: hidden;
}

/* ==========================================
   CONVERSION INFO PANEL
   ========================================== */

.conversion-info {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 15px auto !important;
    max-width: calc(100% - 30px) !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.conversion-info h3 {
    margin: 0 0 15px 0;
    color: #ffc107;
    font-size: 1.5rem;
    font-weight: 600;
}

.conversion-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversion-item {
    margin: 0 0 10px 0 !important;
    font-size: 1.1rem;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    border-left: 4px solid #ffc107 !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    outline: none !important;
}

/* ==========================================
   MAIN CALENDAR CONTAINER
   ========================================== */

.calendar {
    flex: 1;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
    min-height: 600px;
}

/* ==========================================
   CALENDAR HEADER
   ========================================== */

.header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 15px !important;
    background: rgba(0, 0, 0, 0.2);
}

.month-year {
    text-align: center !important;
    flex: 1 !important;
}

.month-year h2 {
    margin: 5px 0 !important;
    color: white !important;
    font-size: 1.8rem;
    font-weight: 600;
}

.month-year h3 {
    margin: 5px 0 !important;
    color: #ffc107 !important;
    font-size: 1.2rem;
    font-weight: 400;
}

/* Navigation Buttons */
.nav-button, #prev-month, #next-month {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    outline: none !important;
    color: white !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
    min-width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-button:hover, #prev-month:hover, #next-month:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1) !important;
}

.nav-button:active, #prev-month:active, #next-month:active {
    transform: scale(0.95) !important;
}

/* ==========================================
   DAYS HEADER (HARI DALAM Ahad)
   ========================================== */

.days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 8px !important;
    padding: 0 15px !important;
    margin-bottom: 10px !important;
    background: rgba(0, 0, 0, 0.1);
}

.day {
    text-align: center !important;
    font-weight: bold !important;
    color: #ffc107 !important;
    padding: 10px 0 !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   CALENDAR DATES GRID - PERBAIKAN UTAMA
   ========================================== */

.dates {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    grid-template-rows: repeat(6, minmax(60px, 1fr)) !important;
    gap: 8px !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 400px !important;
}

.date {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 8px !important;
    min-height: 60px !important;
    max-height: 80px !important;
    box-sizing: border-box !important;
    position: relative !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

.date:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

/* Date Numbers */
.gregorian-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.hijri-date {
    font-size: 0.8rem;
    color: #ffc107;
    font-weight: 400;
}

/* Date States */
.date.today {
    background: rgba(255, 193, 7, 0.3) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}

.date.today .gregorian-date {
    color: #ffc107;
    font-weight: bold;
}

.date.prev-month, .date.next-month {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05) !important;
}

.date.prev-month:hover, .date.next-month:hover {
    opacity: 0.6;
}

/* Holiday Styling */
.gregorian-date.national-holiday {
    color: #ff6b6b !important;
    font-weight: bold;
    position: relative;
}

.gregorian-date.national-holiday::after {
    content: "🎉";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
}

/* ==========================================
   LOADING & ERROR STATES
   ========================================== */

.loading-message {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    color: white !important;
    padding: 40px 20px !important;
    font-size: 1.1rem !important;
}

.loading-message i {
    margin-right: 10px !important;
    color: #ffc107 !important;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #ff6b6b;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 20px;
}

/* ==========================================
   DISCLAIMER
   ========================================== */

.disclaimer {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.disclaimer p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.4;
}

/* ==========================================
   MOBILE TOP SECTION
   ========================================== */

.mobile-top {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.digital-clock {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #ffc107;
    font-family: 'Courier New', monospace;
}

.current-date {
    font-size: 1.2rem;
    text-align: center;
    color: white;
    font-weight: 500;
}

.hijri-date {
    font-size: 1rem;
    text-align: center;
    color: #ffc107;
}

/* ==========================================
   DESKTOP SIDEBAR
   ========================================== */

.sidebar {
    width: 300px !important;
    max-width: 300px !important;
    flex-shrink: 0 !important;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.sidebar-content {
    padding: 20px;
}

.sidebar #digital-clock {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: #ffc107;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.sidebar #current-date {
    font-size: 1.1rem;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-weight: 500;
}

.sidebar #current-hijri-date {
    font-size: 1rem;
    text-align: center;
    color: #ffc107;
    margin-bottom: 20px;
}

/* ==========================================
   ACTION BUTTONS
   ========================================== */

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.action-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Social Media Button Colors */
.action-icon[title*="WhatsApp"]:hover {
    background: #25D366;
    border-color: #25D366;
}

.action-icon[title*="Telegram"]:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.action-icon[title*="Facebook"]:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.action-icon[title*="Twitter"]:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.action-icon[title*="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-color: #bc1888;
}

/* ==========================================
   HOLIDAY LIST
   ========================================== */

.holiday-container {
    margin-top: 20px;
}

.holiday-container h4 {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

#holiday-list, #mobile-holiday-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#holiday-list li, #mobile-holiday-list li {
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.4;
}

#holiday-list li strong, #mobile-holiday-list li strong {
    color: #ffc107;
    margin-right: 5px;
}

.holiday-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* ==========================================
   ADVERTISEMENT CONTAINER
   ========================================== */

.ad-container {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin: 20px 0;
    font-size: 0.9rem;
}

/* ==========================================
   MOBILE BOTTOM SECTION
   ========================================== */

.mobile-bottom {
    display: none;
    margin-top: 20px;
}

/* ==========================================
   RESPONSIVE DESIGN - TABLET
   ========================================== */

@media (max-width: 968px) {
    .calendar-wrapper {
        flex-direction: column;
        padding: 15px !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .mobile-top,
    .mobile-bottom {
        display: block;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - MOBILE
   ========================================== */

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-icon {
        display: block;
    }
    
    .calendar-wrapper {
        padding: 10px !important;
    }
    
    .conversion-info {
        margin: 10px auto !important;
        padding: 15px;
    }
    
    .conversion-info h3 {
        font-size: 1.2rem;
    }
    
    .conversion-item {
        font-size: 1rem;
        padding: 8px !important;
    }
    
    .dates {
        gap: 4px !important;
        padding: 10px !important;
        grid-template-rows: repeat(6, minmax(50px, 1fr)) !important;
    }
    
    .date {
        min-height: 50px !important;
        max-height: 60px !important;
        padding: 4px !important;
        font-size: 0.9rem !important;
    }
    
    .gregorian-date {
        font-size: 1rem;
    }
    
    .hijri-date {
        font-size: 0.7rem;
    }
    
    .days {
        gap: 4px !important;
        padding: 0 10px !important;
    }
    
    .day {
        font-size: 0.8rem;
        padding: 8px 0 !important;
    }
    
    .header {
        padding: 15px 10px !important;
    }
    
    .month-year h2 {
        font-size: 1.4rem;
    }
    
    .month-year h3 {
        font-size: 1rem;
    }
    
    .nav-button, #prev-month, #next-month {
        min-width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    .mobile-top {
        display: flex;
    }
    
    .mobile-bottom {
        display: block;
    }
    
    .action-buttons {
        gap: 10px;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ========================================== */

@media (max-width: 480px) {
    .main-header {
        padding: 10px 15px;
    }
    
    .calendar-wrapper {
        padding: 8px !important;
    }
    
    .conversion-info {
        margin: 8px auto !important;
        padding: 12px;
    }
    
    .conversion-info h3 {
        font-size: 1.1rem;
    }
    
    .conversion-item {
        font-size: 0.9rem;
        padding: 6px !important;
    }
    
    .dates {
        gap: 2px !important;
        padding: 8px !important;
        grid-template-rows: repeat(6, minmax(45px, 1fr)) !important;
    }
    
    .date {
        min-height: 45px !important;
        max-height: 55px !important;
        padding: 2px !important;
        font-size: 0.8rem !important;
    }
    
    .gregorian-date {
        font-size: 0.9rem;
    }
    
    .hijri-date {
        font-size: 0.6rem;
    }
    
    .days {
        gap: 2px !important;
        padding: 0 8px !important;
        font-size: 0.7rem !important;
    }
    
    .day {
        font-size: 0.7rem;
        padding: 6px 0 !important;
    }
    
    .header {
        padding: 10px 8px !important;
    }
    
    .month-year h2 {
        font-size: 1.2rem;
    }
    
    .month-year h3 {
        font-size: 0.9rem;
    }
    
    .nav-button, #prev-month, #next-month {
        min-width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
        padding: 5px !important;
    }
    
    .digital-clock {
        font-size: 1.5rem;
    }
    
    .current-date {
        font-size: 1rem;
    }
    
    .action-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .disclaimer {
        padding: 10px;
    }
    
    .disclaimer p {
        font-size: 0.75rem;
    }
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

/* WebKit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.8);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 7, 0.6) rgba(255, 255, 255, 0.1);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

.calendar {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.date.today {
    animation: pulse 2s infinite;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-header,
    .sidebar,
    .action-buttons,
    .mobile-top,
    .mobile-bottom,
    .ad-container {
        display: none !important;
    }
    
    .calendar {
        background: white !important;
        border: 2px solid #333 !important;
        color: black !important;
    }
    
    .date {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
    
    .gregorian-date {
        color: black !important;
    }
    
    .hijri-date {
        color: #666 !important;
    }
    
    .day {
        color: #333 !important;
    }
    
    .month-year h2,
    .month-year h3 {
        color: black !important;
    }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */

@media (prefers-contrast: high) {
    .calendar {
        border: 2px solid white !important;
    }
    
    .date {
        border: 1px solid white !important;
    }
    
    .gregorian-date {
        color: white !important;
        font-weight: bold !important;
    }
    
    .hijri-date {
        color: #ffc107 !important;
        font-weight: bold !important;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* PERBAIKAN 4: Puasa Sunnah Indicator */
.fasting-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    color: #28a745;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.sunnah-fasting-item {
    border-left: 3px solid #28a745 !important;
}

.fasting-type {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: normal;
    margin-left: 5px;
    opacity: 0.8;
}

/* PERBAIKAN 5: Penanggalan Jawa */
.javanese-date {
    font-size: 0.6rem;
    color: #ffc107;
    opacity: 0.7;
    text-align: center;
    line-height: 1;
}

.javanese-date.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .javanese-date.desktop-only {
        display: none;
    }
}

/* PERBAIKAN 6: Target Date dari URL */
.date.target-date {
    box-shadow: 0 0 0 3px #ffc107, 0 0 20px rgba(255, 193, 7, 0.6) !important;
    transform: scale(1.05);
    z-index: 10;
    position: relative;
}

.date.target-date::before {
    content: "📍";
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.2rem;
    z-index: 1;
}

/* Enhanced holiday list styling */
.national-holiday-item {
    border-left: 3px solid #ff4444 !important;
}

/* Copy button styling */
#share-instagram {
    transition: all 0.3s ease;
}

#share-instagram:hover {
    background: #007bff !important;
    border-color: #007bff !important;
}

/* Toast notification */
.toast-notification {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile interaction feedback */
@media (max-width: 768px) {
    .date:active {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(0.95);
    }
}

/* PERBAIKAN 3: Layout Desktop - Tanggal Masehi Besar */
.gregorian-date {
    font-size: 1.5rem !important; /* Lebih besar untuk desktop */
    font-weight: 700 !important;
    color: white;
    margin-bottom: 2px;
    text-align: center;
}

/* PERBAIKAN 3: Hijri date - Pojok Kanan Bawah */
.hijri-date {
    position: absolute !important;
    bottom: 2px !important;
    right: 4px !important;
    font-size: 0.7rem !important;
    color: #ffc107 !important;
    font-weight: 400;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 3px;
    border-radius: 3px;
}

/* PERBAIKAN 3: Penanggalan Jawa - Kiri Bawah, Tanpa Nama Hari */
.javanese-date.desktop-only {
    position: absolute !important;
    bottom: 2px !important;
    left: 4px !important;
    font-size: 0.65rem !important;
    color: #17a2b8 !important;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 3px;
    border-radius: 3px;
    opacity: 0.8;
    display: block !important;
}

/* Mobile - sembunyikan penanggalan Jawa di layout */
@media (max-width: 768px) {
    .javanese-date.desktop-only {
        display: none !important;
    }
    
    .gregorian-date {
        font-size: 1.2rem !important;
    }
    
    .hijri-date {
        font-size: 0.6rem !important;
        bottom: 1px !important;
        right: 2px !important;
    }
}

@media (max-width: 480px) {
    .gregorian-date {
        font-size: 1rem !important;
    }
    
    .hijri-date {
        font-size: 0.55rem !important;
    }
}

/* Pastikan posisi date element relative */
.date {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 8px !important;
    min-height: 60px !important;
    max-height: 80px !important;
}

/* Puasa sunnah indicator - adjust position */
.fasting-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #28a745;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* PERBAIKAN 1: Warning style untuk hari yang dilarang puasa */
.date.forbidden-fasting {
    border: 1px solid #dc3545 !important;
}

.date.forbidden-fasting::after {
    content: "⚠️";
    position: absolute;
    top: -2px;
    left: -2px;
    font-size: 0.6rem;
    z-index: 3;
}

/* PERBAIKAN 2: Header "Catatan" styling */
.holiday-container h4 {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
}

/* Enhanced styling untuk sunnah fasting items */
.sunnah-fasting-item {
    border-left: 3px solid #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
}

.national-holiday-item {
    border-left: 3px solid #ff4444 !important;
    background: rgba(255, 68, 68, 0.1) !important;
}

.fasting-type {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: normal;
    margin-left: 5px;
    opacity: 0.8;
}

/* Target date dari URL */
.date.target-date {
    box-shadow: 0 0 0 3px #ffc107, 0 0 20px rgba(255, 193, 7, 0.6) !important;
    transform: scale(1.05);
    z-index: 10;
    position: relative;
}

.date.target-date::before {
    content: "📍";
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.2rem;
    z-index: 1;
}

/* Hijri Date Below Advertisement Styling */
#hijri-today-desktop,
#hijri-today-mobile {
    background: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    margin-top: 15px !important;
    text-align: center !important;
    color: #ffc107 !important;
    font-weight: bold !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    z-index: 5 !important;
}

#hijri-today-desktop:hover,
#hijri-today-mobile:hover {
    background: rgba(255, 193, 7, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hijri-today-mobile {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
        margin-top: 12px !important;
    }
}

@media (max-width: 480px) {
    #hijri-today-mobile {
        font-size: 0.8rem !important;
        padding: 8px 10px !important;
        margin-top: 10px !important;
    }
}

/* Ensure proper spacing with other elements */
.ad-container + #hijri-today-desktop,
.ad-container + #hijri-today-mobile {
    margin-bottom: 15px !important;
}

/* Buat lebih compact dan terintegrasi */
.hijri-today-info {
    background: linear-gradient(135deg, rgba(255,193,7,0.15), rgba(255,193,7,0.05));
    border-left: 4px solid #ffc107;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Jika ada styling khusus untuk hari Ahad */
.sunday-red, 
.ahad-red {
    color: #ff4444 !important;
    font-weight: bold !important;
}

/* Update any Sunday-specific styling */
.date[data-day="ahad"] {
    /* styling khusus untuk hari Ahad */
}

.action-buttons {
    position: sticky;
    bottom: 20px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 10px 20px;
    margin: 20px auto;
    width: fit-content;
    z-index: 100;
}

@media (max-width: 768px) {
    .action-buttons {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }
}

/* ==========================================
   RESPONSIVE HORIZONTAL SHARE BUTTONS LAYOUT
   ========================================== */

.share-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    margin: 20px auto;
    max-width: fit-content;
    transition: all 0.3s ease;
}

/* Desktop: Single line dengan spacing optimal */
@media (min-width: 769px) {
    .share-buttons-container {
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 24px;
    }
    
    .share-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Tablet: Single line yang Anda sukai */
@media (min-width: 481px) and (max-width: 768px) {
    .share-buttons-container {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 20px;
    }
    
    .share-button {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

/* Mobile: Single line dengan ukuran optimal untuk thumb */
@media (max-width: 480px) {
    .share-buttons-container {
        flex-wrap: nowrap;
        gap: 6px;
        padding: 8px 16px;
        margin: 15px auto;
    }
    
    .share-button {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        min-width: 44px; /* Memastikan touch target minimum */
    }
}

/* Individual button styling yang konsisten */
.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex-shrink: 0; /* Mencegah button menyusut */
}

.share-button:hover,
.share-button:focus {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Color variations untuk setiap platform */
.share-button.whatsapp { 
    --btn-color: #25D366; 
}
.share-button.telegram { 
    --btn-color: #0088cc; 
}
.share-button.facebook { 
    --btn-color: #1877f2; 
}
.share-button.download { 
    --btn-color: #17a2b8; 
}
.share-button.copy { 
    --btn-color: #6c757d; 
}

.share-button:hover {
    background-color: var(--btn-color);
    border-color: var(--btn-color);
    color: white;
}

/* ==========================================
   FINAL FIX - DESKTOP SHARE BUTTONS OVERFLOW
   ========================================== */

@media (min-width: 1024px) {
    .share-buttons-container {
        /* FIXED CONTAINER CONTROL */
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        
        /* PREVENT OVERFLOW - CRITICAL */
        width: 100%;
        max-width: 320px !important; /* Reduced untuk 5 buttons */
        margin: 20px auto;
        padding: 10px 15px;
        
        /* VISUAL STYLING */
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        
        /* OVERFLOW SAFETY */
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .share-button {
        /* CALCULATED BUTTON SIZE - Perfect fit untuk 5 buttons */
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        
        /* PRECISE SPACING */
        margin: 0 3px !important; /* Total: 5×40px + 8×3px = 224px */
        
        /* CONSISTENT STYLING */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        color: white;
        font-size: 1rem;
        
        /* FLEX CONTROL - CRITICAL */
        flex-shrink: 0;
        flex-grow: 0;
        
        /* TRANSITIONS */
        transition: all 0.3s ease;
        cursor: pointer;
        text-decoration: none;
    }
    
    /* EDGE BUTTONS - Remove outer margins */
    .share-button:first-child {
        margin-left: 0 !important;
    }
    
    .share-button:last-child {
        margin-right: 0 !important;
    }
}

/* EXTRA SMALL DESKTOP - Safety untuk resolusi kecil */
@media (min-width: 1024px) and (max-width: 1200px) {
    .share-buttons-container {
        max-width: 280px !important;
        padding: 8px 12px;
    }
    
    .share-button {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        margin: 0 2px !important;
        font-size: 0.9rem;
    }
}

/* ==========================================
   PATCH: FIX DESKTOP SHARE OVERFLOW
   ========================================== */

@media (min-width: 1024px) {
    .share-buttons-container {
        max-width: 320px !important;
        overflow: hidden !important;
        flex-wrap: nowrap !important;
    }
    
    .share-button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin: 0 3px !important;
    }
    
    .share-button:first-child {
        margin-left: 0 !important;
    }
    
    .share-button:last-child {
        margin-right: 0 !important;
    }
}

/* ==========================================
   TABLET BACKGROUND FIX - MIRIP MOBILE
   ========================================== */

@media (min-width: 481px) and (max-width: 1023px) {
    /* Body background untuk tablet - sama seperti mobile */
    body {
        background-size: cover !important;
        background-attachment: fixed !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Overlay gelap untuk tablet - sama seperti mobile */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            rgba(0, 0, 0, 0.7), 
            rgba(0, 0, 0, 0.7)
        ) !important;
        z-index: -1;
        pointer-events: none;
    }
    
    /* Calendar container untuk tablet */
    .calendar {
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Calendar header untuk tablet */
    .calendar .header {
        background: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(5px) !important;
    }
    
    /* Days header untuk tablet */
    .calendar .days {
        background: rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Date cells untuk tablet */
    .calendar .dates > div {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Today highlight untuk tablet */
    .calendar .dates > div.today,
    .calendar .dates > div[style*="rgba(255, 193, 7"] {
        background: rgba(255, 193, 7, 0.2) !important;
        border: 2px solid #ffc107 !important;
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.4) !important;
    }
    
    /* Other month days untuk tablet */
    .calendar .dates > div[style*="opacity"] {
        opacity: 0.3 !important;
    }
    
    /* Sidebar dan content containers untuk tablet */
    .page-container,
    .content-wrapper,
    .sidebar {
        background: rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(5px) !important;
    }
    
    /* Holiday list containers untuk tablet */
    #holiday-list-container,
    #mobile-holiday-list-container {
        background: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Share buttons container untuk tablet */
    .share-buttons-container {
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Hijri date display untuk tablet */
    #hijri-today-desktop,
    #hijri-today-mobile {
        background: rgba(255, 193, 7, 0.1) !important;
        border: 1px solid rgba(255, 193, 7, 0.3) !important;
        backdrop-filter: blur(5px) !important;
    }
    
    /* Menu dan navigation untuk tablet */
    #sidebar-menu {
        background: rgba(0, 0, 0, 0.9) !important;
        backdrop-filter: blur(15px) !important;
    }
    
    /* Form elements untuk tablet */
    input, select, textarea {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(5px) !important;
    }
    
    /* Cards dan panels untuk tablet */
    .card, .panel, .widget {
        background: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
}

/* ==========================================
   ENHANCE MOBILE CONSISTENCY (Optional)
   ========================================== */

@media (max-width: 480px) {
    /* Pastikan mobile tetap konsisten */
    body::before {
        background: linear-gradient(
            rgba(0, 0, 0, 0.7), 
            rgba(0, 0, 0, 0.7)
        ) !important;
    }
    
    .calendar {
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(10px) !important;
    }
}

/* ==========================================
   HIDE REDUNDANT ELEMENTS - BASED ON SCREENSHOT
   ========================================== */

/* 1. Hide Hasil Konversi Container - Box utama yang ditandai */
.hasil-konversi-container,
#hasil-konversi,
#hasil-konversi-tanggal,
.conversion-result,
.conversion-display,
.date-conversion-box,
.konversi-result,
.conversion-info {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 8. Hide Empty Containers setelah elements dihide */
div:empty,
section:empty,
.container:empty {
    display: none !important;
}


/* Header Optimal ~50px */
.main-header {
    padding: 8px 16px !important;
    min-height: 48px !important;
}

.main-header .logo-container img {
    height: 30px !important;
    width: auto !important;
}

.main-header .desktop-nav {
    gap: 18px !important;
}

.main-header .desktop-nav a {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    padding: 4px 0 !important;
}

/* Header lebih ramping di mobile */
@media (max-width: 768px) {
    .main-header {
        padding: 6px 12px !important;
        min-height: 44px !important;
    }

    .main-header .logo-container img {
        height: 26px !important;
    }

    .main-header .desktop-nav {
        gap: 12px !important;
    }

    .main-header .desktop-nav a {
        font-size: 0.85rem !important;
    }
}

/* Smooth transition untuk header */
.main-header,
.main-header .logo-container img,
.main-header .desktop-nav a {
    transition: all 0.25s ease-in-out !important;
}

/* Shrinked header saat scroll */
.main-header.shrink {
    padding: 4px 12px !important;
    min-height: 40px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    transition: all 0.25s ease-in-out !important;
}

.main-header.shrink .logo-container img {
    height: 24px !important;
    transition: all 0.25s ease-in-out !important;
}

.main-header.shrink .desktop-nav a {
    font-size: 0.85rem !important;
}