:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --border: #334155;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --sidebar-width: 300px;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

button,
.drop-zone,
.mode-toggle button,
input {
    touch-action: manipulation;
}

.container {
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

header .accent {
    color: var(--accent);
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.mode-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 2rem;
    width: fit-content;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.mode-toggle button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.mode-toggle button.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.mode-toggle button:hover:not(.active) {
    color: var(--text-primary);
    background: #ffffff10;
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    width: 100%;
    user-select: none;
}

#image-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border: 1px solid var(--border);
}

.preview-container {
    margin-bottom: 2rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: #1e293b80;
    transform: translateY(-2px);
}

.drop-content svg {
    margin-bottom: 1rem;
    color: var(--accent);
}

.drop-content p {
    font-weight: 500;
}

.drop-content span {
    color: var(--accent);
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Config Card */
.config-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.config-header h3 {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.mode-selector-segment {
    display: flex;
    background: var(--bg-color);
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.segment-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.segment-btn.active {
    background: var(--card-bg);
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.segment-btn:hover:not(.active) {
    color: var(--text-primary);
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.input-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.primary-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.secondary-btn {
    gap: 5px;
    background: var(--border);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #33415580;
    border-color: var(--accent);
}

/* Status Card */
.status-card,
.result-card,
.error-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps-list {
    list-style: none;
}

.steps-list li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.steps-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.steps-list li.active {
    color: var(--accent);
}

.steps-list li.active::before {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* Result Card */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.badge {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.claims-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.claim-item label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.claim-item span {
    font-weight: 600;
}

.claim-item a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    word-break: break-word;
}

.socials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-tag {
    background: var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

/* Error Card */
.error-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-color: #ef444450;
}

.error-card svg {
    color: var(--error);
    flex-shrink: 0;
}

.error-msg h3 {
    margin-bottom: 0.25rem;
}

.error-msg p {
    color: var(--text-secondary);
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    body {
        padding: 1rem;
        padding-top: 2rem;
        align-items: flex-start;
    }

    header {
        margin-bottom: 2rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 1rem;
    }

    .mode-toggle {
        width: 100%;
        max-width: 320px;
        gap: 0.5rem;
    }

    .mode-toggle button {
        flex: 1;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .drop-zone {
        padding: 3rem 1rem;
    }

    .config-card,
    .status-card,
    .result-card,
    .error-card {
        padding: 1.5rem 1rem;
    }

    .claims-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .primary-btn {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}

/* Batch Processing UI */
.batch-container {
    margin-bottom: 2rem;
}

.batch-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.batch-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.batch-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.batch-item:hover {
    border-color: var(--accent);
}

.batch-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.batch-info {
    flex: 1;
    min-width: 0;
}

.batch-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.batch-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.batch-item.done .batch-status {
    color: var(--success);
}

.batch-item.error .batch-status {
    color: var(--error);
}

.batch-item.processing {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.batch-actions {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.view-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.batch-summary {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Custom scrollbar for batch list */
.batch-list::-webkit-scrollbar {
    width: 6px;
}

.batch-list::-webkit-scrollbar-track {
    background: transparent;
}

.batch-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.batch-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Sidebar & Menu */
.menu-toggle {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.menu-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    z-index: 1002;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.sidebar.active {
    transform: translateX(var(--sidebar-width));
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.35rem;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--accent);
    color: white;
}

/* Glassmorphism Auth Modal */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 7, 16, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-container {
    position: relative;
    width: 95%;
    max-width: 400px;
    z-index: 2001;
}

.auth-modal-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    z-index: -1;
}

.auth-modal-bg .shape {
    height: 150px;
    width: 150px;
    position: absolute;
    border-radius: 50%;
}

.auth-modal-bg .shape:first-child {
    background: linear-gradient(#1845ad, #23a2f6);
    left: -50px;
    top: -50px;
}

.auth-modal-bg .shape:last-child {
    background: linear-gradient(to right, #ff512f, #f09819);
    right: -30px;
    bottom: -50px;
}

.auth-modal {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    padding: 40px 30px;
    width: 100%;
}

.auth-modal h3 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.auth-modal .input-group {
    margin-top: 20px;
}

.auth-modal label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin-bottom: 8px;
}

.auth-modal input {
    display: block;
    height: 45px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 0 15px;
    font-size: 14px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.auth-modal input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.auth-modal .primary-btn {
    margin-top: 30px;
    width: 100%;
    background-color: white;
    color: #080710;
    font-weight: 700;
    height: 45px;
    border-radius: 5px;
    font-size: 16px;
}

.auth-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.auth-modal .close-modal:hover {
    color: white;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.sidebar-home-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color 0.2s ease;
}

.sidebar-home-btn:hover {
    color: var(--accent);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--error);
}

/* Login Section */
.login-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.login-section h3 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.login-section .input-group {
    margin-bottom: 1rem;
}

.login-section .input-group label {
    font-size: 0.75rem;
}

.login-section .input-group input {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.3);
}

.login-section .primary-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
}

/* User Profile */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    padding: 2px;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.sidebar-nav li:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-nav li.active {
    background: var(--accent);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.sidebar-nav li i {
    width: 20px;
    text-align: center;
}


@media (max-width: 640px) {
    .menu-toggle {
        top: 1rem;
        left: 1rem;
    }
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--accent);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.sidebar-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 0.5rem;
}

.sidebar-item-content a {
    flex: 1;
}

.inline-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

/* Cloud Signatures Styles */
.cloud-signatures {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
}

.cloud-signatures h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cloud-sig-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--glass-border);
}

.sig-author {
    font-size: 0.9rem;
}

.sig-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.verified-tag {
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
}

.failed-tag {
    color: var(--error);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
}

.cloud-sig-item.verified {
    border-left: 4px solid var(--success);
}

.cloud-sig-item.failed {
    border-left: 4px solid var(--error);
}

#valid-badge.success {
    background: var(--success);
    color: white;
}

/* My Signatures Table Styles */
.signatures-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.signatures-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.signatures-table th {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
}

.signatures-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.signatures-table tr:last-child td {
    border-bottom: none;
}

.signatures-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.signatures-table code {
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: var(--accent);
}

/* My Keys Page Styles */
.keys-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .keys-grid {
        grid-template-columns: 1fr;
    }
}

.key-card,
.key-actions-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
}

.key-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.key-info {
    margin-bottom: 1.5rem;
}

.key-info label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.key-display-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.key-display-wrapper code {
    flex: 1;
    min-width: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.icon-btn:hover {
    color: var(--accent);
}

.action-buttons {
    gap: 5px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-buttons button {
    gap: 5px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
    padding-left: 1.5rem;
}

@media (max-width: 640px) {
    .keys-grid {
        gap: 1rem;
        margin-top: 1rem;
    }

    .key-card,
    .key-actions-card {
        padding: 1.25rem;
    }

    .key-header {
        margin-bottom: 1.25rem;
        font-size: 1.05rem;
    }

    .key-display-wrapper {
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .key-display-wrapper code {
        font-size: 0.8rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .action-buttons {
        gap: 0.75rem;
    }

    .action-buttons button {
        justify-content: center;
        padding-left: 1rem;
    }
}

/* Status Toast */
.status-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideInUp 0.3s ease-out forwards;
}

.status-toast i {
    color: #10b981;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.check-count-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.75rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.empty-table {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-secondary);
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: var(--glass-bg);
    border-radius: 1rem;
    border: 1px dashed var(--border);
    color: var(--text-secondary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100vw;
    }

    body {
        padding: 0;
    }

    .container {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    header h1 {
        font-size: 2rem;
    }

    .mode-toggle {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .mode-toggle button {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .sidebar {
        padding: 1.5rem;
    }

    .signatures-list {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: flex;
    }

    /* Auth Modal Mobile Tweaks */
    .auth-modal {
        padding: 30px 20px;
    }

    .auth-modal-bg .shape:first-child {
        left: -30px;
        top: -30px;
        height: 100px;
        width: 100px;
    }

    .auth-modal-bg .shape:last-child {
        right: -10px;
        bottom: -30px;
        height: 100px;
        width: 100px;
    }
}

@media (min-width: 769px) {

    .menu-toggle,
    .sidebar-backdrop,
    #menu-close {
        display: none;
    }

    body {
        padding-left: var(--sidebar-width);
    }

    .sidebar {
        left: 0 !important;
        transform: none !important;
        box-shadow: none;
        border-right: 1px solid var(--glass-border);
    }



    /* Table Interaction Enhancements */
    .signatures-table td {
        vertical-align: middle;
    }

    .icon-btn-small {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        border-radius: 6px;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.2s ease;
    }

    .icon-btn-small:hover {
        background: var(--accent);
        color: white;
        border-color: var(--accent);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(56, 189, 248, 0.3);
    }

    .key-cell {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .key-cell code {
        font-size: 0.85rem;
        flex: 1;
    }

    .action-cell {
        text-align: center;
    }

    .copy-hashes-btn i {
        font-size: 0.9rem;
    }

    /* Licenses Section Styling */
    .license-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .license-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: 1rem;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .license-card:hover {
        border-color: var(--accent);
        transform: translateY(-4px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(56, 189, 248, 0.1);
    }

    .license-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .license-card:hover::before {
        opacity: 1;
    }

    .license-card h3 {
        font-size: 1.15rem;
        color: var(--accent);
        margin-bottom: 0.25rem;
    }

    .license-card p {
        font-size: 0.9rem;
        color: var(--text-primary);
    }

    .license-card .license-desc {
        color: var(--text-secondary);
        font-size: 0.85rem;
        line-height: 1.5;
        flex-grow: 1;
    }

    .license-card a {
        color: var(--accent);
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }

    .license-card a:hover {
        text-decoration: underline;
    }

    @media (max-width: 640px) {
        .license-list {
            grid-template-columns: 1fr;
        }
    }

    /* Sidebar Settings */
    .sidebar-settings {
        margin-top: 3rem;
        padding-top: 2rem;
        border-top: 1px solid var(--glass-border);
    }

    .sidebar-settings h3 {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-secondary);
        margin-bottom: 1.25rem;
    }

    .setting-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        gap: 1.5rem;
        /* The requested gap */
    }

    .setting-item span {
        font-size: 0.9rem;
        color: var(--text-primary);
        font-weight: 500;
    }

    .primary-btn:active,
    .secondary-btn:active,
    .icon-btn-small:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* Ensure buttons are properly clickable on mobile */
    button,
    .nav-item,
    .sidebar-home-btn {
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Status Badges */
    .badge {
        display: inline-block;
        padding: 0.4rem 1rem;
        border-radius: 2rem;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
        border: 1px solid rgba(239, 68, 68, 0.2);
        margin-bottom: 1rem;
    }

    .badge.success {
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
        border: 1px solid rgba(16, 185, 129, 0.2);
    }