.bmkg-widget-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #4A90E2 0%, #003366 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow: visible;
}

.bmkg-search-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.bmkg-city-search {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: background 0.3s ease;
}

.bmkg-city-search::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.bmkg-city-search:focus {
    background: rgba(255, 255, 255, 0.3);
}

.bmkg-btn-location {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bmkg-btn-location:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bmkg-btn-location.loading {
    animation: spin 1s infinite linear;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bmkg-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: calc(100% - 52px); /* minus button width & gap */
    background: #fff;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.bmkg-autocomplete-item {
    padding: 10px 16px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #eee;
}

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

.bmkg-autocomplete-item:hover {
    background: #f5f7fa;
}

.bmkg-weather-content {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bmkg-placeholder, .bmkg-loading, .bmkg-error {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.bmkg-error {
    color: #ffbaba;
}

.bmkg-current-header h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.bmkg-date {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.bmkg-current-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.bmkg-icon-large {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.bmkg-temp {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.bmkg-desc {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

.bmkg-details {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: 12px;
}

.bmkg-detail-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bmkg-detail-item span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.bmkg-detail-item strong {
    font-size: 14px;
    font-weight: 600;
}

.bmkg-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.bmkg-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.bmkg-footer a:hover {
    text-decoration: underline;
}

/* Finance Badges */
.bmkg-finance-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.bmkg-finance-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

.bmkg-finance-usd {
    margin-bottom: 20px;
}

.bmkg-finance-btc {
    margin-top: 20px;
}

.bmkg-finance-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.bmkg-finance-value {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Widget Header */
.id-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.id-widget-header img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.id-widget-header span {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Adjust finance badges inside standalone widget */
.id-finance-widget .bmkg-finance-usd {
    margin-bottom: 15px;
    margin-top: 0;
}

.id-finance-widget .bmkg-finance-btc {
    margin-top: 0;
    margin-bottom: 0;
}

/* Outstanding Rain Box */
.bmkg-rain-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.bmkg-rain-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.bmkg-rain-box:hover::before {
    opacity: 1;
}

.bmkg-rain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bmkg-rain-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmkg-info-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bmkg-info-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.bmkg-rain-percentage {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.bmkg-rain-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.bmkg-rain-metrics {
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 12px;
}

.bmkg-rain-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bmkg-rm-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmkg-rm-value {
    font-size: 14px;
    font-weight: 600;
}

/* Modal Scientific */
.bmkg-scientific-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bmkg-scientific-modal.active {
    opacity: 1;
    visibility: visible;
}

.bmkg-modal-content {
    background: #fff;
    color: #333;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.bmkg-scientific-modal.active .bmkg-modal-content {
    transform: translateY(0) scale(1);
}

.bmkg-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.bmkg-modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

.bmkg-modal-content h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmkg-modal-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 10px 0;
}

.bmkg-modal-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
    font-size: 13px;
    color: #666;
}

.bmkg-modal-content li {
    margin-bottom: 6px;
}

/* Modal Footer */
.bmkg-modal-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.bmkg-modal-footer strong {
    background: linear-gradient(135deg, #FF6B6B, #4A90E2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
