/* =========================================
   1. RESET E BASE (DARK VIOLET THEME)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    /* Sfondo: Un viola molto scuro e profondo, quasi nero ai lati */
    background: linear-gradient(135deg, #0f0518 0%, #2e1065 50%, #0f0518 100%);
    position: relative;
    overflow-x: hidden;
    color: #f3f4f6;
}

.background-pattern {
    position: fixed;
    inset: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC4wMyI+PHBhdGggZD0iTTM2IDM0djItSDI0di0yaDEyek0zNiAzMHYySDI0di0yaDF6Ii8+PC9nPjwvZz48L3N2Zz4=');
    opacity: 0.15;
    pointer-events: none;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   2. HEADER (VIOLA STYLE)
   ========================================= */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    /* Gradiente Viola/Fucsia originale */
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.3);
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.title-gradient {
    /* Testo sfumato lilla/rosa */
    background: linear-gradient(135deg, #d8b4fe 0%, #fbcfe8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #a78bfa; /* Un viola chiaro tenue per il sottotitolo */
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.privacy-notice {
    color: #4ade80;
    font-size: 0.9375rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.privacy-icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* =========================================
   3. CARD & INPUTS
   ========================================= */
.card {
    /* Vetro scuro con sfumatura violacea */
    background: rgba(19, 10, 35, 0.6); 
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.15); /* Bordo viola sottile */
    padding: 2.5rem;
    width: 100%;
    margin-bottom: 2rem;
}

.input-section {
    margin-bottom: 2.5rem;
}

.input-label {
    display: block;
    color: #e9d5ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.input-wrapper {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 1rem;
    color: white;
    font-size: 1.25rem;
    outline: none;
    transition: all 0.3s;
}

.password-input::placeholder {
    color: #7c7c7c;
}

.password-input:focus {
    border-color: #a855f7; /* Viola acceso al focus */
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

.toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a78bfa;
    transition: color 0.3s;
    padding: 0.5rem;
}

.toggle-btn:hover {
    color: white;
}

.eye-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* =========================================
   4. STRENGTH BAR & RESULTS
   ========================================= */
.results {
    animation: fadeIn 0.3s ease-out;
    width: 100%;
}

.hidden {
    display: none !important;
}

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

.strength-section {
    margin-bottom: 2rem;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.strength-label {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.strength-value {
    font-size: 1.25rem;
    font-weight: bold;
}

.text-green { color: #4ade80; }
.text-red { color: #ef4444; }

.strength-bar-bg {
    height: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    transition: all 0.5s;
    border-radius: 9999px;
}

/* Colors */
.strength-very-strong { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); }
.strength-strong { background: linear-gradient(90deg, #eab308 0%, #fbbf24 100%); }
.strength-medium { background: linear-gradient(90deg, #f97316 0%, #fb923c 100%); }
.strength-weak { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); }

/* =========================================
   5. LAYOUT & CRACK TIME
   ========================================= */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.column-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.column-right {
    display: flex;
    flex-direction: column;
}

/* Crack Time Box - DARK VIOLET THEME */
.crack-time-box {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(219, 39, 119, 0.1) 100%);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 1rem;
    padding: 1.75rem;
}

.crack-time-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #e9d5ff;
    font-weight: 600;
    font-size: 1.125rem;
}

.clock-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #c084fc;
}

.crack-time-value {
    font-size: 1.875rem;
    font-weight: bold;
    background: linear-gradient(135deg, #c084fc 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* =========================================
   6. WARNING BOXES
   ========================================= */
.warning-box {
    border-radius: 1rem;
    padding: 1.75rem;
}

.warning-content {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.common-warning {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid #ef4444;
}

.common-warning h3 {
    color: #fca5a5;
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.common-warning p {
    color: #fecaca;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.errors-box {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.5);
}

.errors-header {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.errors-header h3 {
    color: #fdba74;
    font-weight: bold;
    font-size: 1.125rem;
}

.warning-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.common-warning .warning-icon { color: #fca5a5; }
.errors-box .warning-icon { color: #fdba74; }

#errorsList {
    list-style: none;
    margin-left: 2.5rem;
}

#errorsList li {
    color: #fed7aa;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    font-size: 1rem;
}

/* =========================================
   7. LINK UTILI (VIOLA STYLE & GRANDI)
   ========================================= */
.info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #c084fc; /* Purple Neon */
    text-decoration: none;
    font-size: 1.125rem; /* Ingranditi */
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 0.75rem;
    padding: 0.25rem 0;
}

.info-link:hover {
    color: #e9d5ff;
    transform: translateX(4px);
    text-decoration: underline;
}

.info-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* =========================================
   8. CHECKLIST & SUCCESS
   ========================================= */
.checklist-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.75rem;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.05);
}

.checklist-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
}

.zap-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #facc15;
}

.checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.check-circle {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-circle.checked { background: #22c55e; }
.check-circle.unchecked { background: #374151; }

.check-mark {
    color: white;
    font-size: 0.875rem;
}

.check-text { font-size: 1rem; }
.check-item.checked .check-text { color: #86efac; }
.check-item.unchecked .check-text { color: #9ca3af; }

.success-box {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid #22c55e;
    border-radius: 1rem;
    padding: 1.75rem;
}

.success-content {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.success-box h3 {
    color: #4ade80;
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.625rem;
}

.success-text {
    color: #86efac;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.success-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #4ade80;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* =========================================
   9. CAUTION BOX (OSINT) - FULL WIDTH
   ========================================= */
.caution-box {
    /* Forziamo la larghezza */
    grid-column: 1 / -1; 
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    
    /* Stile adattato al tema viola scuro */
    background: rgba(69, 10, 10, 0.6); /* Rosso scuro/Ambra profondo */
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 6px solid #f59e0b;   /* Barra laterale arancione */
    border-radius: 0.75rem;
    
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Effetto bagliore interno */
.caution-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.caution-title {
    color: #fbbf24;
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 1.5rem; 
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
}

.caution-text {
    color: #fcd34d;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.caution-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1rem;
    color: #fde68a;
    font-size: 1.05rem;
    list-style: none;
    margin-left: 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.1);
}

.caution-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.caution-list li::before {
    content: "⚠️";
    font-size: 1.2em;
    flex-shrink: 0;
}

/* =========================================
   10. FOOTER & EMPTY STATES
   ========================================= */
.empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-icon {
    width: 5rem;
    height: 5rem;
    color: #4b5563;
    margin: 0 auto 1.5rem;
}

.empty-text {
    color: #9ca3af;
    font-size: 1.25rem;
}

.footer {
    text-align: center;
    color: #6b7280;
    font-size: 0.9375rem;
    margin-top: 1rem;
}

/* =========================================
   11. RESPONSIVE
   ========================================= */
@media (max-width: 968px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .title { font-size: 2.25rem; }
    .card { padding: 1.75rem; }
    .container { padding: 1.5rem 1rem; }
    .password-input { font-size: 1.125rem; padding: 1rem 3rem 1rem 1.25rem; }
    
    .caution-title { font-size: 1.25rem; }
    .caution-list { grid-template-columns: 1fr; }
}