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

:root {
    /* Colori Nero e Viola Brillante */
    --black: #000000;
    --black-light: #1a1a1a;
    --black-dark: #0a0a0a;
    --purple-neon: #9D00FF;
    --purple-bright: #B026FF;
    --purple-dark: #7000CC;
    --purple-light: #C850FF;
    --purple-glow: rgba(157, 0, 255, 0.5);
    --white: #ffffff;
    --gray: #666666;
    --gray-light: #999999;
    
    /* Gradienti */
    --gradient-primary: linear-gradient(135deg, #9D00FF 0%, #B026FF 50%, #C850FF 100%);
    --gradient-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2a0a3a 100%);
    
    /* Shadow & Glow */
    --glow: 0 0 20px var(--purple-glow);
    --glow-strong: 0 0 40px var(--purple-glow), 0 0 60px var(--purple-glow);
}

/* Mobile First */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-dark);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(157, 0, 255, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    text-decoration: none;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.3s;
    padding: 8px 15px;
    border-radius: 25px;
    background: rgba(157, 0, 255, 0.1);
    border: 1px solid transparent;
}

.back-link:hover {
    color: var(--purple-bright);
    border-color: var(--purple-bright);
    box-shadow: var(--glow);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

/* Register Card */
.register-card {
    background: var(--black-light);
    border: 2px solid var(--purple-dark);
    border-radius: 30px;
    padding: 40px 25px;
    box-shadow: var(--glow);
    animation: fadeInUp 0.8s ease-out;
}

.logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px var(--purple-glow));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-section h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 800;
}

.subtitle {
    color: var(--gray-light);
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

/* Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.input-icon {
    width: 18px;
    height: 18px;
    stroke: var(--purple-bright);
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--purple-dark);
    border-radius: 15px;
    background: var(--black-dark);
    color: var(--white);
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    transition: all 0.3s;
    outline: none;
}

.form-group input::placeholder {
    color: var(--gray);
}

.form-group input:focus {
    border-color: var(--purple-bright);
    box-shadow: var(--glow);
}

/* Date Input Styling */
.form-group input[type="date"] {
    color-scheme: dark;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) hue-rotate(220deg) brightness(1.5);
    cursor: pointer;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--purple-bright);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.field-hint {
    color: var(--gray);
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    margin-top: -3px;
}

/* Checkbox Group */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: var(--gray-light);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--purple-dark);
    border-radius: 5px;
    background: var(--black-dark);
    position: relative;
    transition: all 0.3s;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--purple-bright);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-weight: bold;
    font-size: 14px;
}

.checkbox-label a {
    color: var(--purple-bright);
    text-decoration: none;
}

.checkbox-label a:hover {
    color: var(--purple-light);
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: var(--white);
    border: 2px solid var(--purple-bright);
    border-radius: 50px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-strong);
    background: linear-gradient(135deg, #B026FF 0%, #C850FF 50%, #9D00FF 100%);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 10px;
}

.login-link p {
    color: var(--gray-light);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.login-link a {
    color: var(--purple-bright);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.login-link a:hover {
    color: var(--purple-light);
    text-shadow: var(--glow);
}

/* Footer Mini */
.footer-mini {
    text-align: center;
    margin-top: 30px;
    color: var(--gray);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

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

/* Tablet - 640px+ */
@media (min-width: 640px) {
    .register-card {
        padding: 50px 40px;
    }
    
    .logo {
        max-width: 180px;
    }
}

/* Desktop - 968px+ */
@media (min-width: 968px) {
    body {
        padding: 40px;
    }
    
    .container {
        max-width: 550px;
    }
    
    .register-card {
        padding: 60px 50px;
    }
    
    .logo {
        max-width: 200px;
    }
}

