/* Simple Powerful Auto Search Layout */

/* CSS Variables */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b35;
    --success-color: #2ed573;
    --warning-color: #ffa502;
    --error-color: #ff4757;
    --info-color: #3742fa;
    
    --bg-primary: #0a0e13;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #2a3441;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #2a3441;
    --border-hover: #00d4ff;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Simple Header */
.simple-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.simple-header h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.simple-header h1 i {
    color: var(--secondary-color);
}

.status-indicators {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-item.online {
    color: var(--success-color);
}

.status-item i {
    font-size: 0.75rem;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.search-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-group input {
    width: 100%;
    padding: 1rem 4rem 1rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-input-group input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.search-btn:hover {
    background: #e55a2b;
    transform: translateY(-50%) scale(1.05);
}

.detection-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

/* Results Section */
.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.results-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

.results-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-title h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.results-list {
    padding: 2rem;
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Welcome State */
.welcome-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.welcome-state i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-state h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Result Items */
.result-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.result-item:hover::before {
    opacity: 1;
}

.result-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.result-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
}

.result-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.result-badge.critical {
    background: var(--error-color);
    color: white;
}

.result-badge.high {
    background: var(--warning-color);
    color: white;
}

.result-badge.medium {
    background: var(--info-color);
    color: white;
}

.result-badge.low {
    background: var(--success-color);
    color: white;
}

.result-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.result-source i {
    color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

.result-item {
    animation: fadeInUp 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .status-indicators {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .search-container {
        padding: 1.5rem;
    }
    
    .results-header {
        padding: 1rem;
    }
    
    .results-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-meta {
        align-self: flex-end;
    }
    
    .results-list {
        padding: 1rem;
    }
    
    .result-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .simple-header {
        padding: 1rem;
    }
    
    .simple-header h1 {
        font-size: 1.25rem;
    }
    
    .status-indicators {
        gap: 0.75rem;
    }
    
    .status-item {
        font-size: 0.75rem;
    }
    
    .search-input-group input {
        padding: 0.875rem 3rem 0.875rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .search-btn {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    .results-title h2 {
        font-size: 1.125rem;
    }
    
    .results-meta {
        font-size: 0.75rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Focus States */
button:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Credential Leak Table Styles */
.credential-leak-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 1rem -2rem;
}

.credential-leak-header h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.credential-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.credential-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-body {
    max-height: 60vh;
    overflow-y: auto;
}

.credential-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: var(--transition);
}

.credential-row:hover {
    background: var(--bg-hover);
}

.credential-row:last-child {
    border-bottom: none;
}

.col-username,
.col-url,
.col-password {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

.col-username {
    color: var(--primary-color);
    font-weight: 500;
}

.col-url {
    color: var(--text-secondary);
}

.col-password {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Premium User Badge */
.premium-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, var(--secondary-color), var(--warning-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px var(--secondary-color);
    }
    to {
        box-shadow: 0 0 20px var(--warning-color);
    }
}

/* Print Styles */
@media print {
    .simple-header,
    .loading-overlay,
    .premium-badge {
        display: none !important;
    }
    
    .main-container {
        padding: 0 !important;
    }
    
    .results-section {
        border: none !important;
        background: white !important;
    }
    
    .result-item {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .credential-table {
        background: white !important;
        border: 1px solid #ccc !important;
    }
    
    .credential-row {
        border-bottom: 1px solid #ccc !important;
        color: black !important;
    }
}