:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-blue: #2c3e50;
    --light-blue: #3498db;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233498db' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E"),
                  linear-gradient(135deg, #f8f9fc 0%, #e8f4f8 100%);
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
}

/* Background overlay elements for visual interest */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(78, 115, 223, 0.07) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(28, 200, 138, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.centered-title {
    text-align: center;
    font-size: 2.8rem;
    margin-top: 30px;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.navbar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%) !important;
    padding: 0.8rem 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    padding-left: 10px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    padding: 0.8rem 1rem;
    transition: all 0.2s;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 0;
    background-color: white;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover::after {
    visibility: visible;
    width: 100%;
}

.container {
    background-color: white;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    position: relative;
    border-top: 4px solid var(--primary-color);
    overflow: hidden;
}

/* Decorative element for container */
.container::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(78, 115, 223, 0.1) 50%);
    border-radius: 0 0 0 100px;
    z-index: 0;
}

.container > * {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(78, 115, 223, 0.4);
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 115, 223, 0.5);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 2px 6px rgba(28, 200, 138, 0.4);
    transition: all 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(28, 200, 138, 0.5);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    box-shadow: 0 2px 6px rgba(54, 185, 204, 0.4);
    transition: all 0.2s;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(54, 185, 204, 0.5);
}

.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    background-color: white;
    overflow: hidden;
    border-radius: 0.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background: linear-gradient(45deg, var(--primary-color) 0%, var(--info-color) 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 1.25rem;
}

.card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.card:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Table styling */
.table {
    border-radius: 0.35rem;
    overflow: hidden;
}

.table thead th {
    background-color: rgba(78, 115, 223, 0.1);
    border-top: none;
    border-bottom: 2px solid var(--primary-color);
    color: var(--dark-blue);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(78, 115, 223, 0.03);
}

/* Form styling */
.form-control {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    padding: 0.6rem 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Animazioni per le notifiche o messaggi di alert */
.alert {
    animation: fadeIn 0.5s;
    border-radius: 0.35rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login page specific styles */
.login-container {
    max-width: 500px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, transparent 50%, rgba(78, 115, 223, 0.1) 50%);
    border-radius: 0 0 0 150px;
    z-index: 0;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

/* Footer */
footer {
    background-color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 1rem;
    color: #5a5c69;
    font-size: 0.8rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(78, 115, 223, 0.2);
    backdrop-filter: blur(5px);
}

/* Fitness-themed background decoration */
.bg-decoration {
    position: fixed;
    opacity: 0.03;
    z-index: -1;
}

.bg-dumbbell {
    top: 10%;
    right: 5%;
    font-size: 15rem;
    transform: rotate(30deg);
}

.bg-running {
    bottom: 10%;
    left: 5%;
    font-size: 12rem;
    transform: rotate(-15deg);
}

.bg-heartbeat {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20rem;
    opacity: 0.02;
}