/* Premium Reset & Typography */
:root {
    --bg-dark: #0f1115;
    /* Deeper, richer black/blue */
    --card-bg: #161b22;
    /* Slightly lighter card bg */
    --card-border: #262c36;
    /* Subtle border */
    --accent: #6366f1;
    /* Indigo check */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    /* Modern heading font if available, fallback Inter */
    --font-body: 'Inter', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: #818cf8;
    /* Light Indigo */
    text-decoration: none;
}

.portfolio-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: all 0.2s;
}

.portfolio-link:hover {
    color: white;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 2px;
}

.portfolio-item {
    color: var(--text-primary);
}

/* Header with Glassmorphism feel */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: rgba(22, 27, 34, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Modern Navigation */
nav {
    display: flex;
    gap: 8px;
    background: #0d1117;
    padding: 5px;
    border-radius: 10px;
    border: 1px solid #30363d;
}

nav a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

nav a.active {
    background: var(--card-bg);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
}

/* Page Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* Controls Bar */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.count-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 12px;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 12px;
}

/* Form Elements - Premium Feel */
input,
select {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-input {
    width: 280px;
}

/* Data List */
.data-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.row {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px 20px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.2s,
        border-color 0.2s;
}

.row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #3f4451;
}

.row.expanded {
    border-color: var(--accent);
    background: #1a1f28;
}

/* Grid Columns Alignment */
.row-header {
    display: grid;
    /* Icon | Name/Cat | Socials | Date | Amount | Round | Expand */
    grid-template-columns: 48px 2fr 120px 1fr 1fr 1fr 24px;
    align-items: center;
    gap: 16px;
}

.expanded .row-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

/* Startup Icon */
.icon-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Name & Category */
.col-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.name-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    display: flex;
    align-items: center;
}

.tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sub-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Column Data Styles */
.col-data {
    font-size: 0.95rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.col-data.amount {
    color: #4ade80;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    /* Monospace for numbers */
    letter-spacing: -0.5px;
}

.col-date {
    font-size: 0.9rem;
}

.col-round {
    background: #334155;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-align: center;
    display: inline-block;
}

/* Social Icons in Row */
.row-links {
    display: flex;
    gap: 12px;
}

.row-link-icon {
    color: #64748b;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-link-icon:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Expansion Arrow */
.expand-icon {
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expanded .expand-icon {
    transform: rotate(180deg);
    color: white;
}

/* Details Section */
.row-details {
    display: none;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.row.expanded .row-details {
    display: block;
    border-top: 1px solid var(--card-border);
    margin-top: 16px;
    padding-top: 16px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-section {
    margin-bottom: 24px;
}

.detail-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 12px;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.description-box {
    background: #0d1117;
    padding: 20px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.95rem;
    border: 1px solid var(--card-border);
    line-height: 1.6;
}

/* Data Table in Details */
.detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.detail-table th {
    text-align: left;
    color: #64748b;
    padding: 10px 15px;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.detail-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #1e2530;
    /* Very subtle separator */
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.01);
}

.detail-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.detail-table tr:last-child td {
    border-bottom: none;
}

.investor-name-link {
    color: white;
    font-weight: 500;
}

.investor-name-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.website-icon-link {
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.website-icon-link:hover {
    opacity: 1;
    color: white;
}

/* Loader */
.loader-sentinel {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Startups-specific modifications if needed */
/* Responsive Tweak */
@media (max-width: 900px) {
    .row-header {
        /* Drop some columns */
        grid-template-columns: 48px 1fr 100px 24px;
    }

    .col-date,
    .col-round,
    .sub-text,
    .row-links {
        display: none;
    }

    /* Maybe keep amount? */
    .row-links {
        display: none;
    }

    /* Show in expanded instead on mobile */
}

/* Sort Buttons */
.sort-grp {
    display: flex;
    background: #0d1117;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    gap: 2px;
}

.sort-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.sort-btn.active {
    background: var(--card-bg);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
}

/* Filter Selects */
.filter-select {
    background: #0d1117;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    border-color: var(--accent);
    color: white;
}