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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title .material-icons {
    font-size: 3rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.tab-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.tab-content {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.tab-content.active {
    display: grid;
}

/* Main Content */
.main-content {
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-input,
.form-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

/* Results */
.results-container {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid #f3f4f6;
    border-radius: 8px;
    padding: 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
}

.empty-state .material-icons {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-subtitle {
    font-size: 0.875rem;
    margin-top: 8px;
}

.card-item,
.user-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    position: relative;
    transition: all 0.2s ease;
}

.card-item:hover,
.user-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.card-number,
.user-data {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.card-details,
.user-details {
    display: flex;
    gap: 20px;
    font-size: 0.875rem;
    color: #64748b;
    flex-wrap: wrap;
}

.pipe-format {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 1px;
}

.card-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.visa { background: #1a1f71; color: white; }
.mastercard { background: #eb001b; color: white; }
.amex { background: #006fcf; color: white; }
.discover { background: #ff6000; color: white; }

/* Stats */
.stats-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-content {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 200px;
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .title .material-icons {
        font-size: 2.5rem;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        justify-content: center;
    }
    
    .stats-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .title {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .card-details,
    .user-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* Scrollbar Styling */
.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading .material-icons {
    animation: spin 1s linear infinite;
}