/**
 * CYB Mint - Authentication Styles
 * Stili per registrazione, login e verifica email
 * Estende style.css mantenendo coerenza
 */

/* Contenitori auth */
.auth-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    border: 1px solid #e0e6ed;
}

.auth-card h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.auth-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Grid selection specifico per registrazione */
.grid-selection {
    margin-bottom: 1.5rem;
}

.grid-info-display {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    background: #f8f9fa;
    font-size: 0.9rem;
}

.grid-option {
    padding: 1rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.grid-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.grid-option.selected {
    border-color: #3498db;
    background: #e8f4f8;
}

.grid-option input[type="radio"] {
    margin-right: 0.5rem;
}

.grid-name {
    font-weight: 600;
    color: #2c3e50;
}

.grid-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.redeem-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.no-redeem-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Bottoni specifici auth */
.btn-auth {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-register {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-register:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-login {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-auth:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
    transform: none;
}

/* Info boxes specifici */
.security-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.security-info h3 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.security-info ul {
    color: #856404;
    margin: 0;
    padding-left: 1.5rem;
}

.verification-info {
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.verification-info h3 {
    color: #0c5460;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Link tra pagine auth */
.auth-link {
    text-align: center;
    margin-top: 2rem;
    color: #7f8c8d;
    padding: 1rem 0;
}

.auth-link p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #474747;
    font-weight: 600;
    text-decoration: none;
}

.auth-text-highlight {
    color: white !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    background: rgba(0,0,0,0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

.auth-link a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-link .btn-auth {
    display: block;
    margin: 1rem auto 0 auto;
    max-width: 300px;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: #e74c3c;
    width: 25%;
}

.password-strength.medium {
    background: #f39c12;
    width: 50%;
}

.password-strength.strong {
    background: #27ae60;
    width: 75%;
}

.password-strength.very-strong {
    background: #16a085;
    width: 100%;
}

/* Dashboard post-login */
.dashboard-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e0e6ed;
    text-align: center;
}

.dashboard-subtitle {
    margin-bottom: 10px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.balance-display {
    background: linear-gradient(135deg, #27ae60, #16a085);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-width: 200px;
}

.balance-amount {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.action-button {
    padding: 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    color: white;
}

.action-purchase {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.action-purchase:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-redeem {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.action-redeem:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-redeem:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.action-settings {
    background: linear-gradient(135deg, #ff8c00, #ff7700);
}

.action-settings:hover {
    background: linear-gradient(135deg, #ff7700, #e66a00);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-support {
    background: linear-gradient(135deg, #6a4c93, #5a3d7a);
}

.action-support:hover {
    background: linear-gradient(135deg, #5a3d7a, #4a2d6a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.redeem-disabled-note {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .auth-container,
    .dashboard-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .auth-card,
    .dashboard-header {
        padding: 1.5rem;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .balance-display {
        min-width: auto;
        width: 100%;
    }

    .grid-option {
        padding: 0.75rem;
    }

    .grid-description {
        font-size: 0.8rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

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

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    position: relative;
}

.modal-content h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #e74c3c;
    text-decoration: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Dashboard specific styles */
.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logout-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: rgba(231, 76, 60, 0.1);
    text-decoration: none;
}

.status-redeem {
    color: #27ae60;
    font-weight: 600;
}

.status-purchase {
    color: #f39c12;
    font-weight: 600;
}

.info-item {
    margin-bottom: 0.5rem;
}

.security-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.security-icon {
    font-size: 1.2rem;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.action-button small {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    font-weight: 400;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
