/* Reset e base */
* {
    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;
    color: #333;
}

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

/* Auth Container */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.auth-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Alert */
.alert {
    padding: 15px 20px;
    margin: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #363;
    border: 1px solid #cfc;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

/* Forms */
.auth-form {
    display: none;
    padding: 30px;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.dashboard-content {
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e1e5e9;
}

.stat-card h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-weight: 500;
}

/* Link Management */
.links-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

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

.section-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.btn-add {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Link List */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

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

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-image-thumb {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
}

.link-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-upload-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.image-preview {
    width: 140px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hidden {
    display: none !important;
}

.link-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.link-url {
    color: #666;
    font-size: 0.9rem;
    word-break: break-all;
}

.link-stats {
    color: #999;
    font-size: 0.8rem;
}

.link-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

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

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: #333;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

/* Profile Page */
.profile-page {
    max-width: 600px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
}

.profile-name {
    font-size: 2rem;
    margin-bottom: 10px;
}

.profile-bio {
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.5;
}

.profile-links {
    padding: 30px;
}

.profile-link {
    display: block;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-link.profile-link-image {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.profile-link.profile-link-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    transition: opacity 0.3s ease;
}

.profile-link.profile-link-image:hover::before {
    opacity: 0.85;
}

.profile-link-image-overlay {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    z-index: 1;
}

.profile-link.profile-link-image .profile-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.profile-link.profile-link-image .profile-link-title {
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.profile-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
}

.profile-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.profile-link-title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ========== STILI PER INDIRIZZO E MAPPA ========== */

.profile-address {
    margin: 30px 20px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-address h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-address h3 i {
    color: #667eea;
}

.address-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
}

.profile-map {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 15px;
}

/* Stili per i controlli della mappa Leaflet */
.leaflet-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 5px;
}

.leaflet-popup-content {
    margin: 10px 15px;
    font-size: 14px;
}

/* Responsive per mappa */
@media (max-width: 768px) {
    .profile-address {
        margin: 20px 15px;
        padding: 20px;
    }
    
    .profile-map {
        height: 300px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .auth-container {
        margin: 20px auto;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .link-item {
        flex-direction: column;
        text-align: center;
    }
    
    .link-actions {
        justify-content: center;
    }
    
    .profile-page {
        margin: 20px auto;
    }
    
    .profile-header {
        padding: 30px 20px;
    }
    
    .profile-links {
        padding: 20px;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
    text-decoration: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    margin-bottom: 30px;
    color: #666;
}

/* Profile Form */
.profile-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

.profile-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.profile-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

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

.auth-container, .dashboard, .profile-page {
    animation: fadeIn 0.6s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== STILI PER LINK ACCORCIATI ========== */

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Short Link Form */
.short-link-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

/* Short Links List */
.short-links-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.short-link-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.short-link-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.short-link-info {
    flex: 1;
}

.short-link-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.short-link-url {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    word-break: break-all;
}

.short-link-short {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.short-url {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.short-url:hover {
    text-decoration: underline;
}

.btn-copy {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

.short-link-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.short-link-stats {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 0.8rem;
}

.short-link-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.short-link-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-stats {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-stats:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Stats Modal */
.stats-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-item h4 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-item p {
    color: #666;
    font-weight: 500;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.chart-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.chart-section h4 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.loading-stats {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-stats i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
}

/* Responsive per link accorciati */
@media (max-width: 768px) {
    .short-link-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .short-link-actions {
        justify-content: center;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .short-link-short {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== STILI PER ANALYTICS ========== */

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Top Links Section */
.top-links-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-links-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.top-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.top-link-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.rank {
    width: 30px;
    height: 30px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.top-link-item .link-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.top-link-item .link-info {
    flex: 1;
}

.top-link-item .link-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.top-link-item .link-url {
    color: #666;
    font-size: 0.9rem;
    word-break: break-all;
}

.link-clicks {
    text-align: center;
    min-width: 80px;
}

.click-count {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.click-label {
    font-size: 0.8rem;
    color: #666;
}

/* Responsive per analytics */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .top-link-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .link-clicks {
        min-width: auto;
    }
}

/* ========== STILI PER QR CODE ========== */

/* QR Code Section */
.qr-code-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.qr-code {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qr-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e1e5e9;
}

.qr-image:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.btn-qr {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-qr:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* QR Modal */
.qr-modal {
    max-width: 500px;
    text-align: center;
}

.qr-modal-content {
    padding: 20px;
}

.qr-display {
    margin-bottom: 30px;
}

.qr-large {
    width: 250px;
    height: 250px;
    border-radius: 15px;
    border: 3px solid #e1e5e9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.qr-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.qr-actions .btn {
    min-width: 150px;
}

/* Responsive per QR */
@media (max-width: 768px) {
    .qr-code {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-large {
        width: 200px;
        height: 200px;
    }
    
    .qr-actions {
        flex-direction: column;
    }
    
    .qr-actions .btn {
        min-width: auto;
    }
}

/* ========== STILI PER MENÙ DASHBOARD ========== */

/* Dashboard Navigation */
.dashboard-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 0;
}

.nav-tabs {
    display: flex;
    overflow-x: auto;
    gap: 0;
}

.nav-tab {
    background: transparent;
    border: none;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    background: #e9ecef;
    color: #333;
}

.nav-tab.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.nav-tab i {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* Info Cards */
.info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.info-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.info-card p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card li:before {
    content: "✓";
    background: rgba(255,255,255,0.2);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.setting-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.setting-card h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.setting-card .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.setting-card .form-control:focus {
    outline: none;
    border-color: #667eea;
}

.setting-card .social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.setting-card .form-group label i {
    margin-right: 8px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Responsive per menù */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tab {
        padding: 15px 20px;
        border-bottom: 1px solid #e1e5e9;
        border-right: none;
    }
    
    .nav-tab.active {
        border-bottom-color: #e1e5e9;
        border-left: 3px solid #667eea;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card i {
        font-size: 2rem;
    }
}

/* ========== STILI PER SOCIAL LOGIN ========== */

/* Social Login */
.social-login {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 0.9rem;
}

.divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: -1;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-google {
    background: #fff;
    color: #333;
    border-color: #dadce0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.btn-social i {
    font-size: 1.1rem;
}

/* Responsive per social login */
@media (max-width: 768px) {
    .social-buttons {
        gap: 10px;
    }
    
    .btn-social {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* ========== STILI PER PERSONALIZZAZIONE PROFILO ========== */

/* Customization Groups */
.customization-group {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e1e5e9;
}

.customization-group:last-child {
    border-bottom: none;
}

.customization-group h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.theme-option {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 10px;
    border: 2px solid transparent;
}

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

.theme-option.selected {
    border-color: #667eea;
    background: #f8f9fa;
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.theme-colors {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 3px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}

.theme-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-input label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.color-input input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Preview Section */
.preview-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.preview-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.preview-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-preview {
    padding: 20px;
    min-height: 400px;
}

.profile-preview .profile-page {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: scale(0.8);
    transform-origin: top left;
    width: 125%;
}

/* Responsive per personalizzazione */
@media (max-width: 1024px) {
    .customize-container {
        grid-template-columns: 1fr;
    }
    
    .theme-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .color-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .customization-group {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-preview .profile-page {
        transform: scale(0.7);
        width: 143%;
    }
}

.short-links-list .short-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.short-link-qr-preview {
    margin-top: 10px;
}

.short-link-qr-preview .qr-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    padding: 8px;
}
