:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Card Colors */
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    
    /* Status Colors */
    --status-green: #10b981;
    --status-green-glow: rgba(16, 185, 129, 0.3);
    --status-red: #ef4444;
    --status-red-glow: rgba(239, 68, 68, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Header */
.header {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo {
    height: 60px;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.brought-by {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.brought-by strong {
    color: var(--primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    flex: 1;
    width: 100%;
}

/* Search Bar */
.search-container {
    position: relative;
    margin: 2rem auto;
    max-width: 600px;
}

#searchInput {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    transition: color 0.3s ease;
}

#searchInput:focus + .search-icon {
    color: var(--primary);
}

/* Results Info */
.results-info {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
}
.hidden {
    display: none !important;
}

/* Grid & Cards */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease backwards;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

/* Card Details */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.card-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
}

.card-voter-id {
    font-family: monospace;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: bold;
}

.card-serial {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.card-detail {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

/* Status Colors (Mapped/Not Mapped) */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
    width: 100%;
}

.card.status-red {
    border-color: rgba(239, 68, 68, 0.3);
}
.card.status-red:hover {
    box-shadow: 0 10px 30px var(--status-red-glow);
}
.card.status-red .status-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card.status-green {
    border-color: rgba(16, 185, 129, 0.3);
}
.card.status-green:hover {
    box-shadow: 0 10px 30px var(--status-green-glow);
}
.card.status-green .status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    .search-container {
        margin: 1.5rem auto;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.smartkit-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.smartkit-link:hover {
    color: #fff;
    text-decoration: underline;
}
