:root {
    --bg-color: #0A0A12;
    --text-main: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.6);
    --card-bg: rgba(20, 20, 35, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);

    --day-color: #FF9933;
    --night-color: #0d2149;

    --fluid-grad-1: #0A0A12;
    --fluid-grad-2: #1c1c38;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dynamic Fluid Background */
.background-fluid {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--fluid-grad-2) 0%, var(--fluid-grad-1) 100%);
    z-index: -2;
    transition: background 2s ease-in-out;
    animation: flowBg 20s infinite alternate linear;
}

@keyframes flowBg {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(2%, 2%);
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1" fill="white" opacity="0.3"/><circle cx="50" cy="80" r="1" fill="white" opacity="0.8"/><circle cx="170" cy="30" r="1.5" fill="white" opacity="0.5"/><circle cx="130" cy="150" r="1" fill="white" opacity="0.2"/></svg>') repeat;
    z-index: -1;
    opacity: 0.3;
    transition: opacity 2s ease;
}

.app-container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

header {
    text-align: center;
    animation: slideDown 1s ease-out;
}

.app-title {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #FF9933, #FFD600);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 10px rgba(255, 153, 51, 0.3));
}

.app-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Layout */
.clock-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .clock-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Clock SVG styling */
.clock-section {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.2s ease-out;
}

.clock-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
}

#prahari-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.clock-face-backplate {
    fill: var(--card-bg);
    stroke: var(--card-border);
    stroke-width: 2;
    backdrop-filter: blur(10px);
}

.clock-inner-hole {
    fill: rgba(10, 10, 18, 0.8);
    stroke: var(--card-border);
    stroke-width: 1;
}

.clock-time-text {
    font-size: 42px;
    font-weight: 600;
    fill: #FFF;
    text-anchor: middle;
    letter-spacing: 2px;
}

.clock-date-text {
    font-size: 16px;
    fill: var(--text-muted);
    text-anchor: middle;
    letter-spacing: 1px;
}

.time-needle {
    stroke: #FF3366;
    stroke-width: 3;
    stroke-linecap: round;
    transform-origin: 250px 250px;
    filter: drop-shadow(0 0 5px rgba(255, 51, 102, 0.8));
    transition: transform 0.1s linear;
}

.needle-center {
    fill: #FF3366;
}

/* Segments */
.prahar-segment {
    cursor: pointer;
    transition: opacity 0.3s, filter 0.3s;
}

.prahar-segment:hover {
    filter: brightness(1.2);
}

.segment-text {
    font-family: 'Noto Serif Bengali', serif;
    font-weight: 700;
    font-size: 18px;
    fill: #FFFFFF;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.segment-subtext {
    font-size: 10px;
    fill: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.hour-tick {
    stroke: var(--text-muted);
    stroke-width: 1;
}

.hour-text {
    font-size: 14px;
    fill: var(--text-muted);
    text-anchor: middle;
    alignment-baseline: middle;
}

/* Info Section (Glass Card) */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideLeft 1s ease-out;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.pulse-indicator {
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.card-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

.prahar-big-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

#p-bengali {
    font-family: 'Noto Serif Bengali', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--day-color);
}

#p-name {
    font-size: 1.8rem;
    font-weight: 600;
}

.prahar-type {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.prahar-timing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.time-block .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-block .value {
    font-size: 1.5rem;
    font-weight: 600;
}

.time-pipe {
    width: 2px;
    height: 40px;
    background: var(--card-border);
}

/* Progress bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FF9933, #FF3366);
    border-radius: 4px;
    transition: width 1s linear;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.prahar-significance h4 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prahar-significance p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Solar Cards */
.solar-card {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.solar-event {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.solar-event .icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.solar-info {
    display: flex;
    flex-direction: column;
}

.solar-info .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.solar-info .value {
    font-size: 1.2rem;
    font-weight: 600;
}

.location-status {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        scale: 0.9;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}