/* Have I Been Pwned - Style Cybersecurity */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Outfit:wght@300;400;500;600&display=swap');

.breach-page {
    min-height: 80vh;
    padding: 3rem 1.5rem;
    background: #0d0d0d;
    background-image: 
        radial-gradient(ellipse at top, rgba(20, 80, 60, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(80, 20, 40, 0.1) 0%, transparent 50%);
    font-family: 'Outfit', sans-serif;
}

/* Hero Section */
.breach-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: #00ff96;
    filter: drop-shadow(0 0 20px rgba(0, 255, 150, 0.4));
}

.hero-icon svg {
    width: 100%;
    height: 100%;
}

.breach-hero h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: #e8e8e8;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.breach-hero .highlight {
    color: #00ff96;
    text-shadow: 0 0 30px rgba(0, 255, 150, 0.5);
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #707070;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Search Section */
.search-section {
    max-width: 580px;
    margin: 0 auto 2rem;
}

.search-box {
    display: flex;
    gap: 0;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 0.4rem;
    transition: all 0.25s ease;
}

.search-box:focus-within {
    border-color: #00ff96;
    box-shadow: 0 0 0 1px #00ff96, 0 0 40px rgba(0, 255, 150, 0.15);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.9rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    color: #e8e8e8;
    outline: none;
    letter-spacing: -0.02em;
}

.search-box input::placeholder {
    color: #505050;
    font-family: 'Outfit', sans-serif;
}

.search-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: #00ff96;
    border: none;
    border-radius: 2px;
    color: #0d0d0d;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: #00e088;
    box-shadow: 0 0 25px rgba(0, 255, 150, 0.4);
}

.search-box button:active {
    transform: scale(0.98);
}

/* Result Area */
.result-area {
    max-width: 580px;
    margin: 0 auto 3rem;
    min-height: 50px;
}

.searching {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: #606060;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #2a2a2a;
    border-top-color: #00ff96;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Cards */
.result-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    animation: fadeIn 0.35s ease;
}

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

.result-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #2a2a2a;
}

.result-card.compromised .result-header {
    background: linear-gradient(90deg, rgba(255, 60, 60, 0.08) 0%, transparent 100%);
    border-left: 3px solid #ff3c3c;
}

.result-card.safe .result-header {
    background: linear-gradient(90deg, rgba(0, 255, 150, 0.08) 0%, transparent 100%);
    border-left: 3px solid #00ff96;
}

.alert-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 60, 60, 0.15);
    color: #ff3c3c;
    border: 1px solid rgba(255, 60, 60, 0.3);
    border-radius: 2px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.safe-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 150, 0.1);
    color: #00ff96;
    border: 1px solid rgba(0, 255, 150, 0.3);
    border-radius: 2px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.result-header h2 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0;
}

.result-body {
    padding: 1.5rem;
}

.email-display {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    color: #909090;
    background: #0a0a0a;
    padding: 0.7rem 1rem;
    border-radius: 2px;
    border: 1px solid #1a1a1a;
    margin-bottom: 1rem;
    word-break: break-all;
}

.breach-count {
    font-family: 'Outfit', sans-serif;
    color: #808080;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.breach-count strong {
    color: #ff3c3c;
    font-weight: 500;
}

.breach-detail {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.breach-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #d0d0d0;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #1a1a1a;
}

.breach-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.info-row .label {
    font-family: 'Outfit', sans-serif;
    color: #606060;
    font-weight: 400;
}

.info-row .value {
    font-family: 'Outfit', sans-serif;
    color: #a0a0a0;
    font-weight: 500;
}

.password-hint {
    font-family: 'Space Mono', monospace !important;
    color: #00ff96 !important;
    background: rgba(0, 255, 150, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    font-weight: 400 !important;
    font-size: 0.9rem;
    text-shadow: 0 0 15px rgba(0, 255, 150, 0.5);
}

.warning-box {
    background: rgba(255, 180, 0, 0.08);
    border: 1px solid rgba(255, 180, 0, 0.2);
    border-radius: 2px;
    padding: 0.9rem 1rem;
    font-family: 'Outfit', sans-serif;
    color: #b08000;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
}

.warning-box strong {
    font-weight: 500;
}

.result-card.safe .result-body p {
    font-family: 'Outfit', sans-serif;
    color: #808080;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.result-card.safe .note {
    font-size: 0.85rem;
    color: #505050;
    font-style: italic;
}

/* Stats Footer */
.stats-footer {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    flex-wrap: wrap;
    padding-top: 2.5rem;
    border-top: 1px solid #1a1a1a;
    max-width: 580px;
    margin: 0 auto;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d0d0d0;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #505050;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Security Quiz */
.security-quiz {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a2a;
}

.quiz-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 0.5rem;
}

.quiz-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #707070;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.quiz-question {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.quiz-question.answered-correct {
    border-color: rgba(0, 255, 150, 0.3);
}

.quiz-question.answered-wrong {
    border-color: rgba(255, 60, 60, 0.3);
}

.question-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #d0d0d0;
    margin-bottom: 0.75rem;
}

.quiz-option {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #a0a0a0;
    padding: 0.4rem 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.quiz-option:hover {
    color: #e8e8e8;
}

.quiz-option input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #00ff96;
}

.quiz-feedback {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    margin-top: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: 2px;
    line-height: 1.4;
}

.quiz-feedback:empty {
    display: none;
}

.quiz-feedback.correct {
    background: rgba(0, 255, 150, 0.08);
    color: #00ff96;
    border: 1px solid rgba(0, 255, 150, 0.2);
}

.quiz-feedback.error {
    background: rgba(255, 60, 60, 0.08);
    color: #ff3c3c;
    border: 1px solid rgba(255, 60, 60, 0.2);
}

.btn-quiz-validate {
    width: 100%;
    padding: 0.85rem;
    background: #00ff96;
    border: none;
    border-radius: 2px;
    color: #0d0d0d;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-quiz-validate:hover {
    background: #00e088;
    box-shadow: 0 0 25px rgba(0, 255, 150, 0.4);
}

.quiz-success-msg {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    background: rgba(0, 255, 150, 0.08);
    border: 1px solid rgba(0, 255, 150, 0.3);
    border-radius: 2px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #00ff96;
    animation: fadeIn 0.35s ease;
}

/* Password Change Challenge */
.password-change-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a2a;
}

.password-change-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 0.5rem;
}

.password-change-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #707070;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.password-input-wrapper {
    display: flex;
    align-items: center;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    margin-bottom: 1rem;
    transition: border-color 0.25s ease;
}

.password-input-wrapper:focus-within {
    border-color: #00ff96;
    box-shadow: 0 0 0 1px #00ff96, 0 0 20px rgba(0, 255, 150, 0.1);
}

.password-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #e8e8e8;
    outline: none;
}

.toggle-password-btn {
    background: none;
    border: none;
    padding: 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toggle-password-btn:hover {
    opacity: 1;
}

.criteria-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.criteria-list li {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    padding: 0.35rem 0;
    color: #606060;
    transition: color 0.2s ease;
}

.criteria-list li.valid {
    color: #00ff96;
}

.criteria-list li.invalid {
    color: #ff3c3c;
}

.criteria-list li .crit-icon {
    display: inline-block;
    width: 1.2rem;
    text-align: center;
    font-weight: 700;
    margin-right: 0.4rem;
}

.btn-change-password {
    width: 100%;
    padding: 0.85rem;
    background: #00ff96;
    border: none;
    border-radius: 2px;
    color: #0d0d0d;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change-password:disabled {
    background: #2a2a2a;
    color: #505050;
    cursor: not-allowed;
}

.btn-change-password:not(:disabled):hover {
    background: #00e088;
    box-shadow: 0 0 25px rgba(0, 255, 150, 0.4);
}

.password-success-msg {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    background: rgba(0, 255, 150, 0.08);
    border: 1px solid rgba(0, 255, 150, 0.3);
    border-radius: 2px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #00ff96;
    animation: fadeIn 0.35s ease;
}

.password-success-msg .success-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Compact mode pour iframe macOS */
.breach-page.in-iframe {
    min-height: 100vh;
    padding: 1.2rem 1.2rem;
}

.in-iframe .breach-hero {
    margin-bottom: 1.2rem;
}

.in-iframe .hero-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.8rem;
}

.in-iframe .breach-hero h1 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 0.4rem;
}

.in-iframe .tagline {
    font-size: 0.85rem;
    line-height: 1.4;
}

.in-iframe .search-section {
    margin-bottom: 1.2rem;
}

.in-iframe .search-box input {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}

.in-iframe .search-box button {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
}

.in-iframe .result-area {
    margin-bottom: 1.5rem;
}

.in-iframe .result-header {
    padding: 0.9rem 1.2rem;
}

.in-iframe .result-body {
    padding: 1rem;
}

.in-iframe .breach-detail {
    padding: 0.9rem;
    margin-bottom: 0.9rem;
}

.in-iframe .stats-footer {
    gap: 2rem;
    padding-top: 1.2rem;
}

.in-iframe .stat-num {
    font-size: 1.1rem;
}

.in-iframe .security-quiz {
    margin-top: 1rem;
    padding-top: 1rem;
}

.in-iframe .quiz-question {
    padding: 0.8rem 1rem;
    margin-bottom: 0.7rem;
}

.in-iframe .password-change-section {
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .breach-page {
        padding: 2rem 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .search-box button {
        width: 100%;
        justify-content: center;
    }
    
    .stats-footer {
        gap: 2rem;
    }
    
    .result-body {
        padding: 1.25rem;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0.2rem;
    }
}
