* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 550px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #E60000, #0052CC, #D10000);
}

.logo-container {
    margin-bottom: 15px;
    text-align: center;
}

.logo-img {
    max-width: 280px;
    height: auto;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    color: #666;
    margin-bottom: 35px;
    font-size: 1.2rem;
}

.highlighted-subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    color: #c0392b;
}

.login-btn {
    display: inline-block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #E60000, #B80000);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(230, 0, 0, 0.25);
}

.login-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(230, 0, 0, 0.35);
}

.login-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 0, 0, 0.3);
}

.info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin-top: 0;
    text-align: left;
}

.info-box h3 {
    color: #0052CC;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid #dde8f5;
    padding-bottom: 10px;
}

.info-box ul {
    color: #555;
    line-height: 1.7;
    list-style-position: inside;
    padding-left: 0;
}

.info-box li {
    margin-bottom: 10px;
}

.info-box li::marker {
    content: '✓ ';
    color: #0052CC;
}

.info-box a {
    color: #0052CC;
    font-weight: 600;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }

    .title {
        font-size: 2rem;
    }

    .logo-img {
        max-width: 220px;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

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

.error-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block; /* O 'none' se deve essere nascosto di default */
}

/* Stili per la pagina profilo */
.user-info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.user-info-box h3 {
    color: #0052CC;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.user-info-box p {
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1rem;
}

.logout-btn {
    display: inline-block;
    width: auto;
    padding: 15px 40px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn:hover {
    transform: translateY(-3px);
    background: #5a6268;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Stili per il contatore */
.counter-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    margin-bottom: 35px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0d47a1;
}

.counter-box strong {
    font-size: 1.5rem;
}

.progress-bar-container {
    background-color: #bbdefb;
    border-radius: 10px;
    margin-top: 15px;
    height: 18px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #42a5f5, #1e88e5);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

/* Stili per il box del coupon */
.coupon-box {
    background: #e6f7ff;
    border: 2px dashed #0052CC;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.coupon-box h3 {
    color: #0052CC;
    margin-bottom: 15px;
}

.coupon-box p {
    color: #333;
    margin-bottom: 20px;
}

.coupon-code {
    background: white;
    border: 1px solid #ccc;
    padding: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'Courier New', Courier, monospace;
    color: #c0392b;
    border-radius: 8px;
    margin-bottom: 20px;
}

.copy-btn {
    width: auto;
    padding: 12px 25px;
    background: #0052CC;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background: #0041a3;
}

/* Stili per il box di condivisione */
.share-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    text-align: center;
}

.share-box h4 {
    margin-bottom: 15px;
    color: #333;
}

.share-link-container {
    display: flex;
    margin-bottom: 20px;
}

.share-link-container input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px 0 0 8px;
    background-color: #fff;
    font-size: 1rem;
    color: #555;
    border-right: none;
}

.share-link-container button {
    border-radius: 0 8px 8px 0;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.05);
}

.share-btn.email { background-color: #8e44ad; }
.share-btn.whatsapp { background-color: #25D366; }
.share-btn.telegram { background-color: #0088cc; }
.share-btn.linkedin { background-color: #0e76a8; }