* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    /* 基础防复制保护 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* 确保Home导航栏正确显示 */
body.has-apple-navbar {
    padding-top: 64px !important;
}

/* 主容器居中 */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 600;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95em;
    margin-bottom: 30px;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.length-display {
    text-align: center;
    font-size: 1.2em;
    color: #667eea;
    font-weight: 600;
    margin-top: 5px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95em;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.password-output {
    position: relative;
    margin-bottom: 10px;
}

.password-display {
    width: 100%;
    padding: 15px;
    padding-right: 110px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    background: #f9f9f9;
    color: #333;
    word-break: break-all;
    min-height: 50px;
    resize: none;
}

.copy-btn {
    display: block;
    width: 100%;
    margin: 0 auto 20px auto;
    position: static;
    height: 40px;
    min-width: 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 7px;
    padding: 0 18px;
    cursor: pointer;
    font-size: 1.08em;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #5a6fd8;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.18);
    transform: translateY(-2px) scale(1.04);
}

.copy-success {
    background: #48bb78 !important;
    border-color: #48bb78 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.3) !important;
}

@media (max-width: 480px) {
    .copy-btn {
        height: 36px;
        font-size: 1em;
        padding: 0 10px;
    }

    .password-display {
        padding-right: 70px;
    }
}

.strength-meter {
    margin-top: 15px;
}

.strength-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-text {
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
}

.strength-weak {
    background: #ff6b6b;
}

.strength-medium {
    background: #ffd93d;
}

.strength-strong {
    background: #6bcf7f;
}

.strength-very-strong {
    background: #4ecdc4;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4ecdc4;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
    display: none;
    opacity: 0;
    max-width: 300px;
    font-size: 0.9em;
}

.toast.show {
    display: flex;
    opacity: 0.95;
    transform: translateX(-50%) translateY(0) scale(1.02);
}

/* SEO 内容样式 */
.seo-content {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* FAQ标题样式 */
.faq-title {
    font-size: 1.8em;
    color: #333;
    text-align: center;
    margin: 0 0 30px 0;
    padding: 0 0 15px 0;
    border-bottom: 2px solid #667eea;
    font-weight: 600;
}

.faq-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.faq-section summary {
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    font-size: 1.1em;
    color: #667eea;
}

.faq-content {
    padding-top: 15px;
    line-height: 1.6;
}

.faq-content h3 {
    color: #555;
    font-size: 1em;
    margin: 15px 0 8px 0;
    font-weight: 600;
}

.faq-content p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 12px;
}

.page-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    line-height: 1.5;
    margin-top: auto;
}

.page-footer p {
    margin: 5px 0;
}

/* Google AdSense 广告样式 */
.adsense-container,
.adsense-footer {
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 280px;
}

.adsense-container {
    margin: 30px auto;
}

.adsense-footer {
    margin: 40px auto 20px auto;
}

/* Privacy Manager Styles */
.privacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.privacy-modal {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.privacy-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.privacy-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.privacy-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.privacy-content {
    padding: 20px;
}

.privacy-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.privacy-section h3 {
    margin: 0 0 10px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-section p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #667eea;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

input:disabled+.slider {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.privacy-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.data-status-panel {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.status-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-value {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
}

.status-label {
    font-size: 0.8em;
    color: #666;
}

.cleanup-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-warning {
    background: #ffd93d;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Language selector styles */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    min-width: 150px;
    max-height: 400px;
    overflow-y: auto;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    color: #333;
    transition: background 0.2s;
}

.lang-option:hover {
    background: #f0f0f0;
}

.lang-option.active {
    background: #e6eaff;
    color: #667eea;
    font-weight: 600;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SEO Article Styles */
.seo-article {
    padding: 20px 0;
}

.content-block {
    margin-bottom: 30px;
}

.seo-h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    padding-left: 10px;
}

.seo-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.seo-list {
    list-style-position: inside;
    color: #555;
    line-height: 1.6;
}

.seo-list li {
    margin-bottom: 8px;
}

.seo-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.seo-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Strength Table Styles */
.table-responsive {
    overflow-x: auto;
}

.strength-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.strength-table th,
.strength-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.strength-table th {
    background: rgba(102, 126, 234, 0.1);
    color: #333;
    font-weight: 600;
}

.strength-table tr:last-child td {
    border-bottom: none;
}

/* Site Links Footer */
.site-links-footer nav ul li a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.site-links-footer nav ul li a:hover {
    color: #764ba2;
}