
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    text-decoration: none;
}

body {
    background-color: #f5f7fa;
    /* padding: 20px; */
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.device-manager {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

    .device-manager:hover {
        transform: translateY(-5px);
    }

.header {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    color: white;
    text-align: center;
    padding: 24px 20px;
    position: relative;
}

    .header h1 {
        font-size: 28px;
        font-weight: 600;
        letter-spacing: 1px;
    }

    .header p {
        font-size: 16px;
        opacity: 0.9;
        margin-top: 8px;
    }

    .header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 5%;
        width: 90%;
        height: 2px;
        background-color: rgba(255, 255, 255, 0.2);
    }

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
}

.device-card {
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 220px;
    position: relative;
    overflow: hidden;
}

    .device-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
    }

    .device-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    }

.device-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.device-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.device-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 15px;
}

/*  -  */
.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

    .status-indicator:hover {
        transform: scale(1.2);
    }

/*  */
.status-online {
    background-color: #4CAF50;
    color: white;
}

.status-offline {
    background-color: #9E9E9E;
    color: white;
}

.status-warning {
    background-color: #FF9800;
    color: white;
}

/*  */
.status-label {
    position: absolute;
    top: 50px;
    right: 10px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    opacity: 0.9;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.status-label-online {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2E7D32;
}

.status-label-offline {
    background-color: rgba(158, 158, 158, 0.2);
    color: #616161;
}

.status-label-warning {
    background-color: rgba(255, 152, 0, 0.2);
    color: #EF6C00;
}

/* υτ¨° */
.device-soil {
    background: linear-gradient(135deg, #00b09b, #96c93d);
}

.device-pressure {
    background: linear-gradient(135deg, #ff5e62, #ff9966);
}

.device-weather {
    background: linear-gradient(135deg, #36d1dc, #5b86e5);
}

.device-temperature {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.device-humidity {
    background: linear-gradient(135deg, #7ee8fa, #eec0c6);
}

.device-light {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.device-ph {
    background: linear-gradient(135deg, #9d50bb, #6e48aa);
}

.device-co2 {
    background: linear-gradient(135deg, #614385, #516395);
}

.device-motion {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
}

.device-water {
    background: linear-gradient(135deg, #1d976c, #93f9b9);
}

.device-gas {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

.device-noise {
    background: linear-gradient(135deg, #f46b45, #eea849);
}

.controls {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    display: none;
}

    .search-input:focus {
        outline: none;
        border-color: #1e88e5;
        box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
    }

.stats {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 10px;
}

.stat-item {
    margin-left: 5px;
    display: flex;
    align-items: center;
}

    .stat-item i {
        margin-right: 6px;
        font-size: 18px;
    }

.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

/*  */
@media (max-width: 768px) {
    .device-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;
    }

    .device-card {
        height: 200px;
        padding: 20px 15px;
    }

    .device-name {
        font-size: 20px;
    }

    .status-indicator {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .status-label {
        top: 42px;
        right: 8px;
        font-size: 11px;
    }

    .controls {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
    }

    .stats {
        justify-content: space-between;
        width: 100%;
    }
}

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

    .device-card {
        height: 190px;
    }

    .header h1 {
        font-size: 24px;
    }

    .header p {
        font-size: 14px;
    }
}

