:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --background-color: #f5f5f5;
    --text-color: #333;
    --success-color: #4CAF50;
    --danger-color: #f44336;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: var(--primary-color);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.menu-item .material-icons {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.menu-label {
    font-size: 1.2em;
    font-weight: 500;
}

.menu-item .temperature-display {
    position: absolute;
    top: 10px;
    right: 10px;
}

.temperature-display {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: var(--text-color);
}

.control-button {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#toggle-pump, #toggle-light-canape, #toggle-light-salon, #toggle-light-sud, #toggle-pool-light {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#toggle-pump.pump-off, #toggle-light-canape.light-off, #toggle-light-salon.light-off, #toggle-light-sud.light-off, #toggle-pool-light.light-off {
    background-color: var(--success-color);
    color: white;
}

#toggle-pump.pump-on, #toggle-light-canape.light-on, #toggle-light-salon.light-on, #toggle-light-sud.light-on, #toggle-pool-light.light-on {
    background-color: var(--danger-color);
    color: white;
}

/* PAC Controls */
.pac-control {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.pac-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.pac-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2em;
}

.pac-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9em;
}

.control-group select,
.control-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    background-color: white;
}

.control-group input[type="range"] {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.9em;
}

.temp-display {
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    font-size: 0.9em;
}

.pac-apply {
    grid-column: 1 / -1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pac-apply:hover {
    background: var(--primary-dark);
}

/* PAC Selection Interface */
.pac-selection h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.pac-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pac-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.pac-item:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.pac-item .material-icons {
    font-size: 2em;
    color: var(--primary-color);
}

.pac-name {
    flex: 1;
    font-size: 1.2em;
    font-weight: 500;
    color: #495057;
}

.pac-status {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fan-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

.fan-icon path {
    transition: fill 0.3s ease;
}

.fan-icon circle {
    transition: fill 0.3s ease;
}

.pac-item .temperature-display {
    position: static;
    margin-left: 0;
    margin-right: 0;
    display: inline-block;
    vertical-align: middle;
}

/* PAC Configuration Interface */
.pac-config-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.back-button:hover {
    background: #5a6268;
}

.pac-config-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3em;
}

/* Responsive design for PAC controls */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .pac-settings {
        grid-template-columns: 1fr;
    }
    
    .pac-item {
        padding: 15px;
    }
    
    .pac-item .material-icons {
        font-size: 1.5em;
    }
    
    .pac-name {
        font-size: 1em;
    }
}

.power-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pac-power-slider {
    flex: 1;
    min-width: 150px;
}

.power-display {
    min-width: 60px;
    text-align: center;
    font-weight: 500;
    color: var(--primary-color);
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.power-off-btn {
    padding: 6px 12px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.2s;
}

.power-off-btn:hover {
    background-color: #d32f2f;
} 