/* Checksum.css - Scope all styles under .chk-app to prevent side effects on other pages */

.chk-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
    max-width: 900px;
    margin: 10px auto 30px auto;
    padding: 0 10px;
}

.chk-app * {
    box-sizing: border-box;
}

/* Header Banner */
.chk-app .chk-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.chk-app .chk-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.chk-app .chk-header-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 4px 0 0 0;
}

/* Main Card */
.chk-app .chk-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #edf2f7;
    margin-bottom: 24px;
}

/* Controls */
.chk-app .chk-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.chk-app .chk-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chk-app .chk-control-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.chk-app .chk-radio-group {
    display: flex;
    gap: 8px;
}

.chk-app .chk-radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chk-app .chk-radio-group label {
    padding: 6px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chk-app .chk-radio-group label:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.chk-app .chk-radio-group input[type="radio"]:checked + label {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* Input Workspace */
.chk-app .chk-input-panel {
    margin-bottom: 24px;
}

.chk-app .chk-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.chk-app .chk-panel-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4a5568;
}

.chk-app .chk-panel-counter {
    font-size: 0.775rem;
    color: #a0aec0;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 12px;
}

.chk-app .chk-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
}

.chk-app .chk-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Results Grid */
.chk-app .chk-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.chk-app .chk-res-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.chk-app .chk-res-card:hover {
    border-color: #cbd5e0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.chk-app .chk-res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.chk-app .chk-res-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chk-app .chk-res-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chk-app .chk-res-input {
    flex: 1;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    color: #1a202c;
    outline: none;
    transition: border-color 0.2s;
}

.chk-app .chk-res-input:focus {
    border-color: #6366f1;
}

.chk-app .chk-res-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #edf2f7;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chk-app .chk-res-btn:hover {
    background: #6366f1;
    color: #ffffff;
}

/* Toolbar Actions */
.chk-app .chk-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chk-app .chk-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chk-app .chk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chk-app .chk-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.chk-app .chk-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.chk-app .chk-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.chk-app .chk-btn-secondary:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.chk-app .chk-btn-outline {
    background: transparent;
    border: 1px solid #cbd5e0;
    color: #4a5568;
}

.chk-app .chk-btn-outline:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

/* Related Tools Card */
.chk-app .chk-related-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
}

.chk-app .chk-related-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chk-app .chk-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.chk-app .chk-related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chk-app .chk-related-item:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Toast notification */
.chk-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #2d3748;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
}

.chk-toast.show {
    opacity: 1;
    transform: translateY(0);
}
