/* --- Dashboard Container --- */
.dashboard-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: 40px auto 0 auto;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

/* --- Background Grid --- */
.dashboard-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

/* --- Line Chart (SVG) --- */
.chart-line-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.chart-line-path {
    fill: none;
    stroke: var(--orange-action);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 4s ease-out forwards;
    filter: drop-shadow(0 0 10px rgba(255, 102, 0, 0.5));
}

.chart-area-path {
    fill: url(#gradientArea);
    stroke: none;
    opacity: 0;
    animation: fadeInArea 2s ease-out 2s forwards;
}

/* --- Bar Chart --- */
.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    height: 60%;
    z-index: 2;
    padding: 0 20px;
}

.bar {
    width: 8%;
    background: linear-gradient(to top, var(--blue-trust), #4facfe);
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
    transform-origin: bottom;
    transform: scaleY(0);
    animation: growBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
}

.bar:hover {
    opacity: 1;
    filter: brightness(1.2);
}

/* --- Floating Data Cards --- */
.data-card {
    position: absolute;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 3;
    animation: floatCard 6s ease-in-out infinite;
}

.data-card .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.data-card.google {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.data-card.google .dot {
    background-color: #F4B400;
}

.data-card.meta {
    top: 40%;
    left: 5%;
    animation-delay: 2s;
}

.data-card.meta .dot {
    background-color: #0668E1;
}

.data-card.sales {
    bottom: 30%;
    right: 20%;
    animation-delay: 4s;
}

.data-card.sales .dot {
    background-color: #0F9D58;
}

/* --- Animations --- */
@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInArea {
    to {
        opacity: 0.3;
    }
}

@keyframes growBar {
    to {
        transform: scaleY(1);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dashboard-container {
        height: 300px;
        margin-top: 20px;
    }

    .data-card {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}