:root {
    --background-color: #001219;
    --card-background: rgba(20, 30, 40, 0.5);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #ee9b00;
    --rain-color: #a9d6e5;
    --sunny-color: #ffca3a;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: var(--text-primary);
    background-color: var(--background-color);
    overflow: hidden;
    height: 100vh;
}

#p5-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}

.info-card {
    background: var(--card-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    transition: opacity 0.6s ease, transform 0.6s ease;
    cursor: pointer;
    position: relative;
}

.info-card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    position: absolute;
}

/* Styling untuk kontainer kamera AI */
.camera-container {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 9 / 16;
    /* border-radius: 40px; */
    /* box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: transparent;
}

#output-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Efek cermin */
}

#camera-status {
    position: absolute;
    color: var(--text-secondary);
    text-align: center;
    font-size: 1em;
    z-index: 5;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.weather-main .temperature {
    font-size: 4.5em;
    font-weight: 700;
    line-height: 1;
}

.weather-main .weather-icon {
    width: 80px;
    height: 80px;
}

.weather-description {
    font-size: 1.2em;
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.weather-details .detail-item strong {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
}
.weather-details .detail-item span {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* .earthquake-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}
.quake-item {
    padding: 12px 5px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 15px;
    align-items: center;
}
.quake-item:last-child {
    border-bottom: none;
}
.quake-magnitude {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 60px;
    text-align: center;
}
.quake-details small {
    display: block;
    color: var(--text-secondary);
    margin-top: 4px;
} */

#earthquake-display {
    text-align: center;
    padding: 20px 0;
    transition: opacity 0.4s ease-in-out;
}

.quake-magnitude-display {
    font-size: 5em;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 15px;
}

.quake-location-display {
    font-size: 1.1em;
    font-weight: 400;
    margin-bottom: 8px; /* Adjusted margin */
}

.quake-depth-display,
.quake-datetime-display {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-secondary);
}

.quake-depth-display {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 12px;
    display: inline-block;
}

.quake-datetime-display {
    margin-bottom: 15px;
}

.quake-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

#quake-counter {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.25);
    padding: 6px 15px;
    border-radius: 15px;
}

.instruction-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 300;
    pointer-events: none;
}

#tv9-logo {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 100px;
    height: auto;
    z-index: 100;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    /* Menambahkan blur background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(5px);
    padding: 10px 15px; /* Menambah sedikit padding di sekitar logo */
    border-radius: 10px; /* Sudut sedikit membulat */
    background-color: rgba(
        100,
        100,
        100,
        100
    ); /* Latar belakang semi-transparan untuk blur */
}

#fps-display {
    position: fixed;
    top: 60px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: white;
    font-family: monospace;
}

#last-update-display {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: white;
    font-family: monospace;
}

#log-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 110px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    padding: 10px 20px;
    box-sizing: border-box;
    font-family: monospace;
    font-size: 12px;
    z-index: 100;
}
.log-item {
    margin-bottom: 5px;
}
.log-info {
    color: #90d8f0;
}
.log-success {
    color: #86efac;
}
.log-error {
    color: #f87171;
}

#log-container.hidden,
#fps-display.hidden,
#last-update-display.hidden {
    display: none;
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        justify-content: center;
    }
    .camera-container {
        max-width: 220px;
    }
}
