/* style.css - Stile moderno e pulito per la campagna "Spegni la luce" */

/* Reset e impostazioni base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Container principale centrato */
.container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card principale */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Titoli */
h1 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.classe-title {
    color: #3498db;
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 30px;
    padding: 8px 16px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50px;
    display: inline-block;
}

/* Form e input */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Pulsanti */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #219653;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-neutral {
    background: #95a5a6;
    color: white;
}

.btn-neutral:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Messaggi */
.message {
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.message.error {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.message.info {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Azioni */
.actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.welcome {
    margin: 20px 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 500;
}

.welcome span {
    color: #3498db;
    font-weight: 600;
}

/* Tabella admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th {
    background: #3498db;
    color: white;
    text-align: left;
    padding: 15px;
    font-weight: 600;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:nth-child(even) {
    background: #f8f9fa;
}

.admin-table tr:hover {
    background: #e3f2fd;
}

.total-score {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.logout-link {
    display: inline-block;
    margin-top: 20px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .classe-title {
        font-size: 18px;
    }

    .btn {
        padding: 14px;
        font-size: 16px;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}