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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px auto 0;
    padding: 12px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
    font-size: 14px;
    transition: color 0.3s;
    user-select: none;
}

.action-btn:hover {
    color: #333;
}

.action-icon {
    font-size: 18px;
    line-height: 1;
}

.action-text {
    font-size: 14px;
    color: inherit;
}

.settings-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.settings-panel,
.content-panel,
.intro-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.centered-panel {
    max-width: 900px;
    margin: 0 auto;
}

.intro-content {
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}

.intro-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

.intro-content .highlight-text {
    color: #ff4444;
    font-weight: 600;
    font-size: 15px;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

h3 {
    color: #555;
    margin: 15px 0 10px 0;
    font-size: 1.1em;
}

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

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

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.button-group-small {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.custom-keywords-section {
    margin-bottom: 20px;
    text-align: center;
}

.custom-keywords-link {
    color: #667eea;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    text-decoration: underline;
    transition: color 0.3s;
    display: inline-block;
}

.custom-keywords-link:hover {
    color: #5568d3;
}

.custom-keywords-panel {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.3s;
    text-align: left;
}

.keywords-list {
    margin-top: 20px;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #ff6b6b;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    animation: fadeIn 0.3s;
}

.keyword-tag .remove-btn {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.keyword-tag .remove-btn:hover {
    opacity: 1;
}

.empty-message {
    color: #999;
    font-style: italic;
}

.result-panel {
    margin-top: 20px;
}

.result-content {
    min-height: 150px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.result-content:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-content[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

.violation-word {
    background: #ff4444;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    animation: highlight 0.3s;
}

.statistics {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.violation-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.violation-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 16px;
    font-weight: 500;
}

.alert-icon {
    font-size: 20px;
}

.alert-text {
    flex: 1;
}

.alert-text strong {
    color: #ff4444;
    font-size: 1.2em;
    font-weight: bold;
}

.violation-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 8px;
    color: #155724;
    font-size: 16px;
    font-weight: 500;
}

.success-icon {
    font-size: 20px;
}

.success-text {
    flex: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes highlight {
    0% {
        background: #ff8888;
    }
    100% {
        background: #ff4444;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    animation: slideDown 0.3s;
}

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

.modal-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.3em;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

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

.card-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.card-input:focus {
    outline: none;
    border-color: #667eea;
}

.card-message {
    margin-top: 15px;
    min-height: 25px;
    text-align: center;
}

.error-message {
    color: #dc3545;
    font-weight: 500;
    display: block;
}

.success-message {
    color: #28a745;
    font-weight: 500;
    display: block;
}

.info-message {
    color: #667eea;
    font-weight: 500;
    display: block;
}

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

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 图片预览模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 4px;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 2001;
}

.image-modal-close:hover {
    color: #333;
}

/* 卡密验证对话框样式 */
.card-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.card-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.card-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    user-select: none;
}

.card-modal-close:hover {
    color: #333;
}

.card-modal-body {
    padding: 24px;
}

.card-tip {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.card-input-group {
    margin-bottom: 20px;
}

.card-input-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-input-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.card-input-group input:focus {
    border-color: #667eea;
}

.card-result {
    margin-bottom: 16px;
    min-height: 20px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.card-result.success {
    color: #4caf50;
    font-weight: 500;
}

.card-result.error {
    color: #f44336;
}

.card-button-group {
    display: flex;
    gap: 12px;
}

.btn-card-primary {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
}

.btn-card-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-card-secondary {
    flex: 1;
    padding: 12px 24px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-card-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

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

.purchase-modal-content {
    max-width: 500px;
}

.purchase-text {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 20px 0;
    text-align: center;
}

.purchase-image-container {
    text-align: center;
}

.purchase-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

