/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #080710;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(59, 130, 246, 0.4);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-color: #3b82f6;
    --font-sans: 'Inter', 'Noto Sans KR', sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs */
.background-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    animation: floatBlob 25s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: #8b5cf6;
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
    animation-duration: 30s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    top: 40%;
    left: 30%;
    opacity: 0.12;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.15); }
}

/* Layout Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    color: var(--text-primary);
}

.logo-text .highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-tag {
    font-size: 0.85rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #93c5fd, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 1.15fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    .header-tag {
        align-self: flex-start;
    }
}

/* Glass Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 12px 40px 0 rgba(59, 130, 246, 0.15);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
}

.card-title span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--accent-color);
}

/* Rule List & Builder styles */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for rule list */
.rules-list::-webkit-scrollbar { width: 4px; }
.rules-list::-webkit-scrollbar-track { background: transparent; }
.rules-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }

.rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.rule-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.rule-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.rule-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.15);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-item-text {
    word-break: break-all;
    padding-right: 0.5rem;
}

.rule-item-text code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-family: monospace;
    color: #93c5fd;
}

.rule-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.icon-btn.delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-add-rule {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-add-rule:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Rule Builder Form Box */
.rule-builder-form {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1rem;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.rule-builder-form h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.builder-field-group {
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.builder-field-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.builder-field-group input,
.builder-field-group select,
.builder-field-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    width: 100%;
}

.builder-field-group input:focus,
.builder-field-group select:focus,
.builder-field-group textarea:focus {
    border-color: var(--accent-color);
}

.builder-field-group select option {
    background-color: #0d0c15;
    color: #fff;
}

.builder-field-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: var(--font-sans);
}

.builder-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-small {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-small-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-small-primary:hover {
    filter: brightness(1.1);
}

.btn-small-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-small-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Upload & Dropzone Card */
.upload-zone-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.dropzone-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.dropzone-card.dragover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.06);
    transform: scale(1.02);
}

.dropzone-content {
    text-align: center;
    pointer-events: none;
}

.upload-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.dropzone-card:hover .upload-icon-wrapper,
.dropzone-card.dragover .upload-icon-wrapper {
    transform: translateY(-5px);
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    border-color: transparent;
}

.cloud-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.dropzone-card:hover .cloud-icon,
.dropzone-card.dragover .cloud-icon {
    color: #ffffff;
}

.dropzone-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dropzone-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.file-limits {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
}

/* File Info Card */
.file-info-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    gap: 1.5rem;
    padding: 2.25rem !important;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    background: rgba(16, 185, 129, 0.02) !important;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.08) !important;
}

.file-info-card:hover {
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.15) !important;
}

.file-info-card .file-details {
    width: 100%;
}

.file-info-card .action-buttons {
    width: 100%;
}

.file-info-card #downloadBtn {
    font-size: 1.15rem;
    padding: 1rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    position: relative;
}

.file-icon {
    font-size: 1.8rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-meta h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    word-break: break-all;
    padding-right: 2rem;
}

.file-meta p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.remove-file-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-50%) rotate(90deg);
}

/* Status Badges */
.processing-status {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.15rem;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Action Buttons */
.btn {
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-success-anim {
    background: var(--success-gradient) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(16, 185, 129, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
}

/* Preview Table */
.preview-card {
    margin-top: 1rem;
    animation: fadeIn 0.5s ease forwards;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.preview-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-header h2 i {
    color: var(--accent-color);
}

.preview-subtitle {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.badge {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    max-height: 400px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.preview-table th {
    background: rgba(16, 20, 40, 0.95);
    color: #93c5fd;
    font-weight: 600;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    white-space: nowrap;
    z-index: 10;
}

.preview-table td {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    white-space: nowrap;
}

.preview-table tbody tr {
    transition: background-color 0.2s ease;
}

.preview-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.table-container::-webkit-scrollbar { width: 8px; height: 8px; }
.table-container::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.table-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; }
.table-container::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

.highlight-date-format {
    color: #34d399;
    font-weight: 500;
    background: rgba(52, 211, 153, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.empty-cell-placeholder {
    color: rgba(255, 255, 255, 0.15);
    font-style: italic;
    font-size: 0.8rem;
}

/* Footer */
.app-footer {
    margin-top: auto;
    padding: 3rem 0 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Save Rules Database Button & Toast Notification */
.btn-save-db {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-save-db:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: #93c5fd;
    transform: translateY(-1px);
}

.btn-save-db.unsaved {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    animation: alertPulse 2s infinite;
}

.btn-save-db.unsaved:hover {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.7);
    color: #fde047;
}

@keyframes alertPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(13, 12, 21, 0.9);
    border: 1px solid #3b82f6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tabs Styling */
.tabs-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Icon Colors */
.green-icon { color: #10b981; }
.blue-icon { color: #3b82f6; }
.purple-icon { color: #a78bfa; }
.orange-icon { color: #fb923c; }

/* Guide Content Styles */
.guide-content {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.guide-step {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.guide-step-num {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.guide-step-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #fff;
}

.guide-step-text p {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.guide-step-text code {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-family: monospace;
    color: #f472b6;
}

/* Template Download Button */
.btn-template-download {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-template-download:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

/* Placeholder Card (Neon styling) */
.placeholder-card {
    text-align: center;
    padding: 5rem 2rem !important;
    background: rgba(255, 255, 255, 0.01) !important;
}

.neon-icon-wrapper {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.4));
}

.placeholder-card h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #fff;
}

.placeholder-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0 auto;
}

/* Progress bar styling */
.progress-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #10b981);
    transition: width 0.3s ease;
    border-radius: 100px;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* End of Layout Styles */

.device-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.device-badge.pc {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.device-badge.mo {
    background: rgba(167, 139, 250, 0.1);
    color: #c084fc;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.capture-url-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.capture-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.75rem;
}

.btn-card-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 0.4rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-card-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Keyword Split Dropzones Premium Styles */
.keyword-dropzones-wrapper {
    margin-bottom: 0.5rem;
}

.keyword-sub-dropzone {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.01) !important;
}

.keyword-sub-dropzone:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

#dropzoneIndex:hover {
    border-color: rgba(251, 146, 60, 0.7) !important;
}

#dropzoneRaw:hover {
    border-color: rgba(16, 185, 129, 0.7) !important;
}

.keyword-sub-dropzone .upload-icon-wrapper {
    transition: transform 0.3s ease;
}

.keyword-sub-dropzone:hover .upload-icon-wrapper {
    transform: scale(1.1);
}

/* ============================================================
   Competitor Report: T&D Tab Custom Matrix Grid Styles
   ============================================================ */

.td-processor-card {
    border: 1px solid rgba(167, 139, 250, 0.25);
    background: linear-gradient(145deg, rgba(23, 20, 38, 0.95), rgba(13, 11, 23, 0.98));
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.08);
}

.purple-badge {
    background: rgba(167, 139, 250, 0.15) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(167, 139, 250, 0.3) !important;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

.section-subtitle {
    font-size: 0.92rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.td-index-dropzone {
    border: 1.5px dashed rgba(167, 139, 250, 0.4);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
}

.td-index-dropzone:hover, .td-index-dropzone.dragover {
    border-color: #a78bfa !important;
    background: rgba(167, 139, 250, 0.04) !important;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
    transform: translateY(-2px);
}

/* 3-Column Grid for Categories */
.td-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .td-matrix-grid {
        grid-template-columns: 1fr;
    }
}

.td-category-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.td-category-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.category-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gradient backgrounds for categories headers */
.bg-gradient-pink {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(244, 63, 94, 0.05));
    color: #f43f5e;
    border-bottom: 1px solid rgba(244, 63, 94, 0.25);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
    color: #a855f7;
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: #3b82f6;
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.category-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}

/* Keyword slot alignment row - Column Layout for Large Cards */
.keyword-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.25s ease;
    gap: 0.75rem;
}

.keyword-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.keyword-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
    padding-left: 0.2rem;
    border-left: 3px solid var(--accent-color);
}

.device-slots {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

/* 6x Area Expanded File Upload Slots */
.mini-slot {
    flex: 1;
    height: 84px; /* 6x area scaling (approx. 175px * 84px = 14700 px^2) */
    border-radius: 10px;
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    gap: 0.25rem;
}

/* Dynamic FontAwesome Cloud Icon */
.mini-slot::before {
    content: '\f0ee';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.3rem;
    opacity: 0.4;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.mini-slot:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    border-style: solid;
    transform: translateY(-2px);
}

.mini-slot:hover::before {
    opacity: 0.8;
    transform: translateY(-2px);
    color: #fff;
}

.slot-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-slot:hover .slot-label {
    color: #fff;
}

/* Interactive upload states for devices */
.mini-slot[data-device="PC"].has-file {
    border-style: solid;
    border-color: rgba(251, 146, 60, 0.5);
    background: rgba(251, 146, 60, 0.08);
    box-shadow: 0 0 12px rgba(251, 146, 60, 0.15);
}
.mini-slot[data-device="PC"].has-file::before {
    color: #fb923c;
    opacity: 0.9;
    content: '\f15c'; /* File text icon */
}
.mini-slot[data-device="PC"].has-file .slot-label {
    color: #fb923c;
}

.mini-slot[data-device="Mobile"].has-file {
    border-style: solid;
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}
.mini-slot[data-device="Mobile"].has-file::before {
    color: #10b981;
    opacity: 0.9;
    content: '\f15c'; /* File text icon */
}
.mini-slot[data-device="Mobile"].has-file .slot-label {
    color: #10b981;
}

/* Neon dragover styling */
.mini-slot.dragover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-color);
    border-color: var(--accent-color) !important;
    background: rgba(139, 92, 246, 0.12) !important;
    border-style: solid;
}
.mini-slot.dragover::before {
    color: var(--accent-color);
    opacity: 1;
}

.mini-slot.has-file::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 6px currentColor; }
    100% { transform: scale(0.9); opacity: 0.8; }
}


