/* ===== Password Checker - Main Styles ===== */

/* ===== Tool Navigation ===== */
.tool-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 60px;
    z-index: 40;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

.tool-nav .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tool-nav-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.tool-nav-back:hover {
    color: var(--primary);
}

.tool-nav-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

/* ===== Main Wrapper ===== */
.calculator-wrapper {
    padding: 24px 0 60px;
}

.calc-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.calc-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
    color: var(--primary);
}

.calc-icon svg {
    width: 28px;
    height: 28px;
}

.calc-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.calc-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Form ===== */
.calc-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1024px) {
    .calc-form {
        position: static;
    }
}

/* ===== Settings Group ===== */
.settings-group {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
}

.settings-group h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* ===== Input Group ===== */
.input-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.input-group input[type="password"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
    min-width: 180px;
    transition: var(--transition);
}

.input-group input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Buttons ===== */
.calc-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
}

.calc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Strength Preview ===== */
.strength-preview {
    background: var(--bg);
    border-radius: 6px;
    padding: 14px 16px;
}

.strength-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.strength-bar-wrap {
    flex: 1;
    min-width: 120px;
}

.strength-bar-wrap .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.strength-bar {
    height: 6px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    background: #94a3b8;
    border-radius: 6px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-label {
    font-weight: 700;
    font-size: 1.05rem;
    min-width: 70px;
    text-align: center;
}

.strength-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== File List (Results Container) ===== */
.file-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    min-height: 200px;
}

.file-list::-webkit-scrollbar {
    width: 4px;
}

.file-list::-webkit-scrollbar-track {
    background: transparent;
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    display: block;
    margin-top: 4px;
}

/* ===== Result Content ===== */
.result-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.password-display {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--bg);
    padding: 12px 16px;
    border-radius: 8px;
}

.stat-item {
    flex: 1;
    min-width: 80px;
}

.stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stat-item .stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.stat-item .stat-value.danger {
    color: #ef4444;
}

.stat-item .stat-value.warning {
    color: #f59e0b;
}

.stat-item .stat-value.success {
    color: #10b981;
}

/* ===== Recommendations ===== */
.recommendations-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.recommendations-list li {
    padding: 3px 0;
}

/* ===== Result Actions ===== */
.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.result-action-btn {
    padding: 10px 20px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.result-action-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

/* ===== SEO Content ===== */
.seo-content {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.seo-inner {
    max-width: 760px;
}

.seo-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.seo-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--text);
}

.seo-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.seo-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
}

.seo-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
}

.seo-content ul li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 4px 0 4px 24px;
    position: relative;
}

.seo-content ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

.seo-content ol {
    line-height: 1.8;
    padding-left: 20px;
    color: var(--text-secondary);
}

.seo-content ol li {
    margin-bottom: 4px;
}

.seo-content strong {
    color: var(--text);
}

/* ===== Highlight Box ===== */
.highlight-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}

.highlight-box p {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text);
}

/* ===== Screenshot Figure ===== */
.screenshot-figure {
    margin: 20px 0 30px;
}

.screenshot-figure img {
    width: 100%;
    max-width: 760px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    display: block;
}

.screenshot-figure figcaption {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .calc-header {
        flex-direction: column;
        text-align: center;
    }

    .calc-header h1 {
        font-size: 1.4rem;
    }

    .calc-grid {
        gap: 16px;
    }

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

@media (max-width: 640px) {
    .calculator-wrapper {
        padding: 16px 0 40px;
    }

    .calc-form {
        padding: 16px;
    }

    .calc-grid {
        gap: 12px;
    }

    .input-group input[type="password"] {
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    .calc-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .stats-grid {
        flex-direction: column;
        gap: 8px;
    }

    .strength-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .strength-meta {
        flex-wrap: wrap;
        justify-content: center;
    }

    .seo-content {
        margin-top: 30px;
        padding-top: 24px;
    }

    .seo-content h2 {
        font-size: 1.2rem;
    }

    .seo-content h3 {
        font-size: 1rem;
    }

    .seo-content p,
    .seo-content ul li {
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .calc-header h1 {
        font-size: 1.2rem;
    }

    .calc-header p {
        font-size: 0.85rem;
    }

    .calc-icon {
        width: 44px;
        height: 44px;
    }

    .calc-icon svg {
        width: 22px;
        height: 22px;
    }

    .settings-group {
        padding: 10px 12px;
    }

    .settings-group h4 {
        font-size: 0.7rem;
    }

    .input-group input[type="password"] {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .calc-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-item .stat-value {
        font-size: 1rem;
    }

    .seo-content h2 {
        font-size: 1rem;
    }

    .seo-content h3 {
        font-size: 0.9rem;
    }

    .seo-content p,
    .seo-content ul li {
        font-size: 0.82rem;
    }
}