/* ===== OSINT Pro Mini App Styles ===== */

:root {
    --primary: #00ff88;
    --secondary: #00d4ff;
    --accent: #ff6b6b;
    --success: #51cf66;
    --warning: #ffd43b;
    --danger: #ff4757;
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --bg-card: #0f1419;
    --bg-hover: #1a1f2e;
    --border: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gradient-1: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    --gradient-2: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(0,255,136,0.3);
    --shadow-glow-strong: 0 0 50px rgba(0,255,136,0.5);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Tajawal', sans-serif;
    --font-code: 'Fira Code', monospace;
    --font-tech: 'Orbitron', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: var(--font-primary);
    font-weight: 500;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===== LOADER SCREEN ===== */
.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.6s ease;
}

.loader-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
}

.hack-terminal {
    background: linear-gradient(135deg, rgba(0,255,136,0.05) 0%, rgba(0,212,255,0.05) 100%);
    border: 2px solid var(--primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
}

.terminal-header {
    background: var(--bg-card);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: var(--danger); }
.dot.yellow { background: var(--warning); }
.dot.green { background: var(--success); }

.terminal-title {
    color: var(--text-primary);
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 600;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.8;
    background: rgba(0,0,0,0.2);
}

.terminal-line {
    margin-bottom: 0.4rem;
    opacity: 0;
    animation: fadeInTerminal 0.5s ease forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.1s; }
.terminal-line:nth-child(2) { animation-delay: 0.3s; }
.terminal-line:nth-child(3) { animation-delay: 0.5s; }
.terminal-line:nth-child(4) { animation-delay: 0.7s; }
.terminal-line:nth-child(5) { animation-delay: 0.9s; }
.terminal-line:nth-child(6) { animation-delay: 1.1s; }

@keyframes fadeInTerminal {
    to { opacity: 1; }
}

.prompt {
    color: var(--primary);
    margin-right: 0.5rem;
}

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

.output {
    color: var(--text-secondary);
    display: block;
    margin-left: 1.5rem;
}

.output .success {
    color: var(--success);
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.loader-progress-container {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(0,255,136,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,255,136,0.3);
}

.loader-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    box-shadow: 0 0 15px var(--primary);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.loader-percentage {
    text-align: center;
    color: var(--primary);
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== APP CONTAINER ===== */
.app-container {
    min-height: 100vh;
    background: var(--bg-dark);
}

/* ===== HEADER ===== */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,255,136,0.2) 0%, rgba(0,212,255,0.2) 100%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.2rem;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.brand-text {
    font-family: var(--font-tech);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,255,136,0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: rgba(0,255,136,0.2);
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== SEARCH SECTION ===== */
.search-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-tech);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.title-word {
    display: inline-block;
    margin-right: 0.5rem;
}

.title-word.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.search-box {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    background: var(--bg-darker);
    padding: 0.5rem;
}

.search-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}

.search-tab.active {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0,255,136,0.4);
}

.search-tab i {
    font-size: 1.2rem;
}

.search-input-container {
    position: relative;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0,255,136,0.3);
}

.input-icon {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    padding: 1.2rem 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-primary);
}

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

.search-btn {
    padding: 1.2rem 2rem;
    background: var(--gradient-1);
    border: none;
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0,255,136,0.4);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.search-btn:hover .btn-shine {
    left: 100%;
}

.search-hint {
    margin-top: 0.8rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ===== SEARCH STATS ===== */
.search-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all var(--transition);
    text-align: center;
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,255,136,0.2) 0%, rgba(0,212,255,0.2) 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-family: var(--font-code);
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
    text-align: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
}

.stat-item .stat-number {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.stat-item .stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-title i {
    color: var(--primary);
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition);
}

.result-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

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

.result-info h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.risk-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-low {
    background: rgba(81, 207, 102, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.risk-medium {
    background: rgba(255, 212, 59, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.risk-high {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-code);
}

/* ===== PREMIUM BANNER ===== */
.premium-banner {
    background: linear-gradient(135deg, rgba(0,255,136,0.05) 0%, rgba(0,212,255,0.05) 100%);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 1rem;
    backdrop-filter: blur(20px);
}

.premium-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.premium-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 50%;
    color: var(--bg-dark);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.premium-text {
    flex: 1;
}

.premium-text h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.premium-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-premium {
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,255,136,0.4);
}

/* ===== FOOTER ===== */
.app-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0,255,136,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-primary);
    font-family: var(--font-code);
    font-size: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .search-title {
        font-size: 2rem;
    }

    .search-box {
        padding: 1.5rem;
    }

    .search-tabs {
        flex-direction: column;
    }

    .search-tab {
        flex-direction: row;
        justify-content: center;
    }

    .search-stats {
        grid-template-columns: 1fr;
    }

    .premium-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .result-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-section,
    .results-section {
        padding: 1rem;
    }

    .search-title {
        font-size: 1.7rem;
    }

    .search-box {
        padding: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }
}