/**
 * Futuristic Dashboard Styles
 * DHT11 Monitoring System
 */

/* ============================================
   ROOT VARIABLES & THEME COLORS
   ============================================ */
:root {
    --primary-bg: #0a0e27;
    --secondary-bg: #151932;
    --card-bg: rgba(21, 25, 50, 0.85);
    --accent-blue: #00d4ff;
    --accent-purple: #b537f2;
    --accent-pink: #ff0080;
    --accent-cyan: #00fff7;
    --accent-green: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: rgba(0, 212, 255, 0.2);
    --glow-color: rgba(0, 212, 255, 0.4);
    --temp-color: #ff6b6b;
    --humidity-color: #4ecdc4;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(10, 14, 39, 0.95) 0%,
        rgba(21, 25, 50, 0.9) 50%,
        rgba(10, 14, 39, 0.95) 100%);
    z-index: 2;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSIxIiBmaWxsPSIjZmZmIiBvcGFjaXR5PSIwLjgiLz48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSIxLjUiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuNiIvPjxjaXJjbGUgY3g9IjE1MCIgY3k9IjMwIiByPSIxIiBmaWxsPSIjZmZmIiBvcGFjaXR5PSIwLjciLz48Y2lyY2xlIGN4PSI4MCIgY3k9IjE1MCIgcj0iMS4yIiBmaWxsPSIjZmZmIiBvcGFjaXR5PSIwLjUiLz48Y2lyY2xlIGN4PSIxODAiIGN5PSIxODAiIHI9IjEiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuOCIvPjwvc3ZnPg==') repeat;
    z-index: 1;
    animation: stars-move 100s linear infinite;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MDAiIGhlaWdodD0iNTAwIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSIyIiBmaWxsPSIjMDBkNGZmIiBvcGFjaXR5PSIwLjUiLz48Y2lyY2xlIGN4PSIyNTAiIGN5PSIxNTAiIHI9IjEuNSIgZmlsbD0iI2IzN2YyIiBvcGFjaXR5PSIwLjQiLz48Y2lyY2xlIGN4PSI0NTAiIGN5PSI0NTAiIHI9IjIiIGZpbGw9IiMwMGZmZjciIG9wYWNpdHk9IjAuNiIvPjwvc3ZnPg==') repeat;
    z-index: 1;
    animation: twinkling 5s ease-in-out infinite;
}

@keyframes stars-move {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

@keyframes twinkling {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.futuristic-nav {
    background: rgba(21, 25, 50, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 212, 255, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    text-shadow: 0 0 20px var(--accent-blue);
}

.glow-icon {
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px var(--accent-blue)); 
    }
    50% { 
        filter: drop-shadow(0 0 15px var(--accent-blue)); 
    }
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-blue) !important;
    background: rgba(0, 212, 255, 0.1);
}

.status-indicator {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
}

.pulse-dot {
    color: var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */
.futuristic-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.futuristic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 212, 255, 0.1), 
        transparent);
    transition: left 0.5s ease;
}

.futuristic-card:hover::before {
    left: 100%;
}

.futuristic-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
}

/* Header Card */
.header-card {
    padding: 2rem;
    margin-bottom: 0;
}

.neon-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.text-light-blue {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.text-cyber-blue {
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* ============================================
   DATA CARDS
   ============================================ */
.data-card {
    position: relative;
    padding: 2rem 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
    opacity: 0.15;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.data-value {
    margin: 1rem 0;
}

.value-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.value-unit {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.trend-indicator {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.trend-indicator i {
    margin-right: 0.5rem;
}

/* Card Specific Colors */
.temperature-card {
    border-color: rgba(255, 107, 107, 0.3);
}

.temperature-card .value-number {
    color: var(--temp-color);
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.temperature-card .card-icon {
    color: var(--temp-color);
}

.humidity-card {
    border-color: rgba(78, 205, 196, 0.3);
}

.humidity-card .value-number {
    color: var(--humidity-color);
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

.humidity-card .card-icon {
    color: var(--humidity-color);
}

.stats-card, .stats-card-2 {
    border-color: rgba(181, 55, 242, 0.3);
}

.stats-card .value-number, .stats-card-2 .value-number {
    color: var(--accent-purple);
    text-shadow: 0 0 20px rgba(181, 55, 242, 0.5);
}

.stats-card .card-icon, .stats-card-2 .card-icon {
    color: var(--accent-purple);
}

/* Card Glow Effects */
.card-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.data-card:hover .card-glow {
    opacity: 1;
}

.temp-glow {
    background: linear-gradient(90deg, transparent, var(--temp-color), transparent);
}

.hum-glow {
    background: linear-gradient(90deg, transparent, var(--humidity-color), transparent);
}

.stats-glow, .stats-glow-2 {
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.mini-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.mini-stats small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================
   CHARTS
   ============================================ */
.chart-card {
    padding: 0;
}

.card-header-custom {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header-custom h5 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-blue);
    font-size: 1.2rem;
}

.card-body-custom {
    padding: 1.5rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-chart-ctrl {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-chart-ctrl:hover, .btn-chart-ctrl.active {
    background: var(--accent-blue);
    color: var(--primary-bg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ============================================
   STATISTICS PANEL
   ============================================ */
.stats-panel {
    height: 100%;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--accent-blue);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-label i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

.stat-value {
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-value.small {
    font-size: 0.9rem;
}

/* Progress Bars */
.progress-section {
    margin-top: 2rem;
}

.progress-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.custom-progress {
    height: 12px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.custom-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar-temp {
    height: 100%;
    background: linear-gradient(90deg, var(--temp-color), #ff8787);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.progress-bar-hum {
    height: 100%;
    background: linear-gradient(90deg, var(--humidity-color), #70e7df);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

/* ============================================
   TABLE
   ============================================ */
.table-card {
    padding: 0;
}

.futuristic-table {
    color: var(--text-primary);
    margin: 0;
}

.futuristic-table thead {
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 2px solid var(--accent-blue);
}

.futuristic-table thead th {
    border: none;
    padding: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.futuristic-table tbody tr {
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.futuristic-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: scale(1.01);
}

.futuristic-table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.btn-refresh {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.btn-refresh:hover {
    background: var(--accent-blue);
    color: var(--primary-bg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Status Badges */
.badge-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-normal {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.badge-danger {
    background: rgba(255, 0, 128, 0.2);
    color: var(--accent-pink);
    border: 1px solid var(--accent-pink);
}

/* ============================================
   FOOTER
   ============================================ */
.footer-info {
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .neon-text {
        font-size: 2rem;
    }
    
    .data-card {
        min-height: 150px;
    }
    
    .value-number {
        font-size: 2rem !important;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-chart-ctrl {
        flex: 1;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.futuristic-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation for cards */
.row .col-md-6:nth-child(1) .futuristic-card,
.row .col-lg-3:nth-child(1) .futuristic-card {
    animation-delay: 0.1s;
}

.row .col-md-6:nth-child(2) .futuristic-card,
.row .col-lg-3:nth-child(2) .futuristic-card {
    animation-delay: 0.2s;
}

.row .col-lg-3:nth-child(3) .futuristic-card {
    animation-delay: 0.3s;
}

.row .col-lg-3:nth-child(4) .futuristic-card {
    animation-delay: 0.4s;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

