* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    line-height: 1.5;
}

.header {
    background: linear-gradient(to right, #7c3aed, #6d28d9);
    color: white;
    padding: 1rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-inner {
    width: 16px;
    height: 16px;
    border: 1px solid white;
    border-radius: 50%;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-primary {
    background: white;
    color: #7c3aed;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.2;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-value {
    font-size: 0.875rem;
    color: #6b7280;
}

.domain-table {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.table tr:hover {
    background: #f9fafb;
}

.table tr:last-child td {
    border-bottom: none;
}

.domain-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domain-icon {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.domain-icon-inner {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
}

.comment-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 24px;
}

.comment-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save {
    background: #10b981;
    color: white;
}

.btn-save:hover {
    background: #059669;
}

.btn-cancel, .btn-edit {
    background: #6b7280;
    color: white;
}

.btn-cancel:hover, .btn-edit:hover {
    background: #4b5563;
}

.btn-edit {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #dbeafe;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-taken {
    color: #f59e0b;
}

.btn-taken:hover {
    background: #fef3c7;
}

.btn-delete {
    color: #ef4444;
}

.btn-delete:hover {
    background: #fee2e2;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 500px;
    margin: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-textarea {
    resize: vertical;
    height: 80px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.import-options, .export-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.import-option, .export-option {
    padding: 1rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.import-option:hover, .export-option:hover {
    border-color: #7c3aed;
    background: #f8fafc;
    transform: translateY(-1px);
}

.import-option h4, .export-option h4 {
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 1rem;
}

.export-option h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.export-details span::before {
    content: '';
    margin-right: 0.25rem;
}

.import-option input[type="file"] {
    margin: 0.5rem 0;
}

.help-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.loading-indicator.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator span {
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Category specific colors */
.empty { background: #f3f4f6; color: #374151; }
.mostly-empty { background: #dbeafe; color: #1e40af; }
.language { background: #fef3c7; color: #92400e; }
.specific-location { background: #f3e8ff; color: #7c2d12; }
.weak-niche { background: #fed7aa; color: #ea580c; }
.small-activity { background: #e0e7ff; color: #3730a3; }
.good { background: #dcfce7; color: #166534; }
.zinger { background: #d1fae5; color: #065f46; }
.taken { background: #fee2e2; color: #991b1b; }

.hidden { display: none; }

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .domain-table {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}