/* public/css/custom.css */

/* Variabili colori */
:root {
    --primary-color: black;
    --primary-dark: black;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-color: #f9fafb;
    --dark-color: #111827;
}

/* Stili generali */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

/* Centrare il modal */
.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
        min-height: calc(100% - 3.5rem);
    }
}

main {
    flex: 1;
}

.footer {
    margin-top: auto;
}

/* Personalizzazione Bootstrap */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Stili per le card */
.card {
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    font-weight: 600;
}

/* Navbar personalizzata */
.navbar-brand {
    font-weight: 600;
}

.navbar .nav-link {
    font-weight: 500;
}

.navbar .nav-item .active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Dashboard statistiche */
.stats-card {
    border-radius: 1rem;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stats-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

/* Tabelle */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead {
    background-color: var(--light-color);
}

.table thead th {
    font-weight: 600;
    border-bottom: none;
}

/* Animazione NFC */
.nfc-icon {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.nfc-phone {
    position: absolute;
    width: 100px;
    height: 160px;
    background-color: #333;
    border-radius: 15px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #555;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.nfc-phone:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 5px;
    background-color: #222;
    border-radius: 3px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.nfc-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite;
}

.nfc-waves:before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite 0.3s;
    opacity: 0;
}

.nfc-waves:after {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite 0.6s;
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* Badge personalizzati */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
}

/* Code block */
code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #ef4444;
    font-family: 'Courier New', monospace;
}

/* Form controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 16, 26, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 16, 26, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Alert customizations */
.alert {
    border-radius: 0.5rem;
}

/* Pagination */
.pagination {
    border-radius: 0.5rem;
    overflow: hidden;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.page-link {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Display punti grande */
.punti-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 1rem 0;
}

/* Media queries per responsive design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .stats-icon {
        font-size: 2rem;
    }
    
    .punti-display {
        font-size: 3rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.375rem 0.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}