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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    min-height: 100vh;
}

body.locked {
    overflow: hidden;
}

/* Lock Screen */
.lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
}

.lock-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lock-bg {
    position: absolute;
    inset: 0;
    background: url('lock-bg-1772744863317.jpg') center/cover no-repeat;
    filter: blur(6px) brightness(0.45);
    transform: scale(1.05);
}

.lock-card {
    position: relative;
    background: rgba(22, 24, 40, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px 44px 40px;
    text-align: center;
    min-width: 340px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lock-icon {
    margin-bottom: 20px;
}

.lock-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.lock-subtitle {
    font-size: 13px;
    color: #8b8f9a;
    margin-bottom: 28px;
}

.lock-input-wrapper {
    display: flex;
    gap: 8px;
}

.lock-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid #2a2d3a;
    border-radius: 8px;
    color: #e1e4e8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.lock-input:focus {
    border-color: #4ade80;
}

.lock-input.error {
    border-color: #ef4444;
    animation: shake 0.4s ease;
}

.lock-submit {
    padding: 12px 16px;
    background: #4ade80;
    border: none;
    border-radius: 8px;
    color: #0f1117;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.lock-submit:hover {
    background: #22c55e;
}

.lock-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.lock-error.visible {
    opacity: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #161822;
    border-bottom: 1px solid #2a2d3a;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    width: 22px;
    height: 22px;
    color: #4ade80;
}

.icon-sm {
    width: 16px;
    height: 16px;
    color: #4ade80;
}

.title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8b8f9a;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}

main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Input Panel */
.input-panel {
    background: #161822;
    border-radius: 12px;
    border: 1px solid #2a2d3a;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2d3a;
    font-size: 14px;
    font-weight: 500;
}

.badge {
    background: #2a2d3a;
    color: #4ade80;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.clear-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.clear-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.textarea-wrapper {
    display: flex;
    min-height: 200px;
    max-height: 350px;
}

.line-numbers {
    padding: 14px 10px 14px 0;
    min-width: 40px;
    text-align: right;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: #3a3d4a;
    line-height: 1.6;
    user-select: none;
    overflow: hidden;
    border-right: 1px solid #2a2d3a;
    white-space: pre;
}

textarea {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #e1e4e8;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    outline: none;
    overflow-y: auto;
}

textarea::placeholder {
    color: #3a3d4a;
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.btn-generate {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 48px;
    background: #4ade80;
    color: #0f1117;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-generate:hover {
    background: #22c55e;
    transform: translateY(-1px);
}

.btn-generate:disabled {
    background: #2a4a35;
    color: #555;
    cursor: not-allowed;
    transform: none;
}

.btn-generate.running {
    background: #eab308;
    color: #0f1117;
}

.timer {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 16px;
    color: #555;
    background: #161822;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #2a2d3a;
    letter-spacing: 2px;
}

/* Results */
.results-panel {
    background: #161822;
    border-radius: 12px;
    border: 1px solid #2a2d3a;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2d3a;
    font-size: 14px;
    font-weight: 500;
}

.stats {
    display: flex;
    gap: 10px;
}

.stat {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.stat-total {
    background: #1e2030;
    color: #8b8f9a;
}

.stat-found {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.stat-notfound {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.results-body {
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #3a3d4a;
}

.empty-state p {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 500;
}

.empty-state span {
    font-size: 13px;
    margin-top: 4px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    position: sticky;
    top: 0;
    background: #1a1c2a;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #8b8f9a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2d3a;
}

tbody tr {
    border-bottom: 1px solid #1e2030;
    transition: background 0.15s;
}

tbody tr:hover {
    background: #1a1c2a;
}

tbody td {
    padding: 10px 12px;
    white-space: nowrap;
}

tbody td:nth-child(3) {
    white-space: normal;
    max-width: 280px;
}

.status-live {
    color: #4ade80;
    font-weight: 600;
    font-size: 11px;
}

.status-fail {
    color: #ef4444;
    font-weight: 600;
    font-size: 11px;
}

.status-loading {
    color: #eab308;
    font-size: 11px;
}

/* Footer */
.results-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid #2a2d3a;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download:hover {
    background: #1d4ed8;
}

/* Progress row */
.progress-row td {
    color: #eab308 !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2a2d3a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3d4a;
}
