 :root {
    --primary-color: #169db4;
    --secondary-color: #28d8d8;
    --accent-color: #4fc3f7;
    --temp-color: #ff5252;
    --humidity-color: #42a5f5;
    --wind-speed-color: #26c6da;
     --wind-direction-color: #7e57c2;
    --rain-color: #641470;
    --radiation-color: #ffa726;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;  
    background-image: url('/images/img7.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #143c5e;  
    min-height: 100vh;  
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.predictions-column {
    width: 300px;
    background: linear-gradient(135deg, hsla(206, 55%, 41%, 0.9) 0%, hsla(174, 61%, 44%, 0.9) 100%);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.main-content {
    flex: 1;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--secondary-color);
    text-shadow: 1px 1px 3px rgba(11, 74, 80, 0.947);
}

#location {
    font-size: 1rem;
    color: #e7ecf1;
}

.last-update {
    color: #1a1818;
    font-size: 0.9rem;
    margin: 5px 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn {
    background-color: var(--primary-color);
    color: rgb(250, 246, 246);
}

.download-history-btn {
    background-color: #5c6bc0;
    color: white;
}

.share-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(252, 248, 248, 0.1);
}

.view-history-btn {
    background-color: #5c6bc0 !important;
    color: white !important;
}

.view-history-btn:hover {
    background-color: #3949ab !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(243, 245, 252, 0.85);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(15, 15, 15, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(3px);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(6, 6, 6, 0.1);
}

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

.metric-header img {
    width: 24px;
    height: 24px;
}

.metric-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 300;
    margin: 10px 0;
}

.metric-trend {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.up-trend {
    color: #cb4635;
}

.down-trend {
    color: #43a047;
}

.metric-graph {
    height: 60px;
    width: 100%;
}

/* Estilos específicos para cada tipo de tarjeta */
.temperature {
    border-top: 4px solid var(--temp-color);
}

.humidity {
    border-top: 4px solid var(--humidity-color);
}

.wind-speed {
    border-top: 4px solid var(--wind-speed-color);
}

.wind-direction {
    border-top: 4px solid var(--wind-direction-color);
}

.rain {
    border-top: 4px solid var(--rain-color);
}

.radiation {
    border-top: 4px solid var(--radiation-color);
}

/* Estilos para la visualización de dirección del viento */
.wind-direction-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.wind-arrow {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.5s ease;
    color: var(--wind-direction-color);
}

.wind-direction-values {
    text-align: center;
    font-size: 1.2rem;
}

.wind-direction-values span {
    display: block;
    margin: 5px 0;
}

.detailed-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.chart-container {
    background: rgba(245, 238, 238, 0.85);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(10, 10, 10, 0.05);
    backdrop-filter: blur(3px);
}

.chart-container h3 {
    margin-top: 0;
    color: #747373;
}

.chart {
    height: 250px;
    width: 100%;
}

/* Estilos para las tarjetas de predicción */
.prediction-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.prediction-card:hover {
    transform: translateY(-3px);
}

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

.prediction-header img {
    width: 20px;
    height: 20px;
}

.prediction-header h3 {
    margin: 0;
    font-size: 1rem;
}

.prediction-graph {
    height: 80px;
    width: 100%;
    margin: 10px 0;
}

.prediction-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* Estilos específicos para tarjetas de predicción */
.temp-prediction {
    border-left: 4px solid var(--temp-color);
}

.humidity-prediction {
    border-left: 4px solid var(--humidity-color);
}

.wind-speed-prediction {
    border-left: 4px solid var(--wind-speed-color);
}

.wind-direction-prediction {
    border-left: 4px solid var(--wind-direction-color);
}

.rain-prediction {
    border-left: 4px solid var(--rain-color);
}

.radiation-prediction {
    border-left: 4px solid var(--radiation-color);
}

/* Estilos para el modal de historial */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.history-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.history-chart-container {
    height: 400px;
    width: 100%;
}

canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .predictions-column {
        width: 100%;
        order: 2;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .history-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons {
        width: 100%;
        margin-top: 15px;
    }

    .btn {
        flex: 1;
        justify-content: center;
    }
}