* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.device-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.device-info .label {
    font-weight: 300;
    opacity: 0.9;
}

.device-info .value {
    font-weight: bold;
    font-size: 1.2em;
}

.last-update {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
}

/* Main Stats */
.main-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.stat-card.voltage .stat-value { color: #4CAF50; }
.stat-card.current .stat-value { color: #2196F3; }
.stat-card.capacity .stat-value { color: #FF9800; }
.stat-card.power .stat-value { color: #9C27B0; }

/* Sections */
.section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #667eea;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

/* Cells Grid */
.cells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.cell-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.cell-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.cell-item.warning {
    border-color: #f44336;
    background: #ffebee;
}

.cell-number {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.cell-voltage {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

/* Temperature Grid */
.temp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.temp-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.temp-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.temp-value {
    font-size: 2em;
    font-weight: bold;
    color: #f44336;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.status-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.status-item.active {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.status-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
}

.status-label {
    font-weight: bold;
    color: #333;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-label {
    color: #666;
}

.info-value {
    font-weight: bold;
    color: #333;
}

/* Search Section */
.search-section {
    padding: 30px;
    background: #f8f9fa;
    text-align: center;
}

.search-section form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.search-section input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.search-section button {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.3s;
}

.search-section button:hover {
    background: #5568d3;
}

/* Search Container */
.search-container {
    max-width: 500px;
    margin: 100px auto;
    padding: 50px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.search-container h1 {
    color: #667eea;
    margin-bottom: 20px;
}

.search-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.search-container input {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
}

.search-container button {
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
}

.help-text {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9em;
    color: #666;
}

.help-text code {
    background: #e0e0e0;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
}

/* Not Found */
.not-found {
    padding: 50px;
    text-align: center;
}

.not-found h1 {
    color: #f44336;
    margin-bottom: 20px;
}

.not-found ul {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
    padding-left: 30px;
}

.not-found a {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .main-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cells-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
