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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background: #fafafa;
    color: #1f2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}

.logo img {
    height: 32px;
}

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

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #f97316;
}

.btn-primary {
    background: #f97316;
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-1px);
}

.directory-header {
    padding: 3rem 0 2rem;
    text-align: center;
}

.directory-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.directory-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.section-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.leaderboard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 1fr 150px 120px 80px 120px 80px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    text-align: center;
}

.leaderboard-header span:first-child {
    text-align: left;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 1fr 150px 120px 80px 120px 80px;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    transition: background 0.2s;
}

.leaderboard-row:hover {
    background: #fafafa;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-inner {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-box {
        padding: 1rem;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .nav {
        display: flex;
        gap: 1rem;
        align-items: center;
    }
    
    .nav-link {
        display: inline-block !important;
    }
    
    .leaderboard-header {
        display: none !important;
    }
    
    .leaderboard-row {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding: 1.5rem !important;
        border-bottom: 2px solid #e5e7eb;
        gap: 0 !important;
    }
    
    .leaderboard-row:hover {
        background: white;
    }
    
    .startup-info {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }
    
    .startup-logo {
        flex-shrink: 0 !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
    }
    
    .startup-details {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .startup-name {
        font-size: 1.125rem !important;
    }
    
    .startup-desc {
        font-size: 0.875rem !important;
    }
    
    .metric {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 0 !important;
        border-top: 1px solid #f3f4f6;
        text-align: left !important;
        width: 100% !important;
    }
    
    .metric::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 0.875rem;
        min-width: 90px;
        flex-shrink: 0;
    }
    
    .metric a {
        text-align: right;
    }
}

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

.rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: #9ca3af;
    text-align: center;
}

.rank.top {
    color: #f97316;
}

.startup-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.startup-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.startup-logo span {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 6px;
}

.startup-details {
    min-width: 0;
}

.startup-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    text-decoration: none;
    display: block;
}

.startup-name:hover {
    color: #f97316;
}

.startup-desc {
    font-size: 0.875rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.icon-link:hover {
    color: #f97316;
}

.icon-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #f97316;
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    margin: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.submission-form {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-of-type {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: #fff;
    color: #6b7280;
    padding: 0.625rem 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.cf-turnstile {
    margin: 1.5rem 0;
}

