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

:root {
    --primary-color: #00ef8b;
    --primary-dark: #02d87e;
    --secondary-color: #00ef8b;
    --background: #000000;
    --surface: #000000;
    --surface-hover: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #1a1a1a;
    --success: #10b981;
    --error: #ef4444;
    
    /* Flow.com accent colors */
    --accent-blue: #3334F8;
    --accent-blue-light: #99BBFF;
    --accent-aqua: #37DDDF;
    --accent-aqua-light: #9DF1F2;
    --accent-pink: #F4C6FA;
    --accent-pink-dark: #6D3974;
    --accent-purple: #823EE4;
    --accent-purple-dark: #50268C;
}

body {
    font-family: 'Epilogue', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.9);
}

nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.2s;
    letter-spacing: -0.01em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-aqua);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:nth-child(2):hover {
    color: var(--accent-blue-light);
}

.nav-links a:nth-child(2)::after {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

.nav-links a:nth-child(3):hover {
    color: var(--accent-purple);
}

.nav-links a:nth-child(3)::after {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
}

main {
    flex: 1;
}

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

.hero {
    padding: 6rem 0 4rem;
    text-align: left;
    background: linear-gradient(135deg, var(--background) 0%, #0a0a0a 50%, var(--background) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 239, 139, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(51, 52, 248, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(130, 62, 228, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 30%, var(--accent-aqua) 60%, var(--accent-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
}

.how-it-works {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--background) 0%, #0a0a0a 100%);
    position: relative;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(130, 62, 228, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.how-it-works .container {
    position: relative;
    z-index: 1;
}

.how-it-works h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.how-it-works p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    max-width: 800px;
}

.how-it-works a {
    color: var(--accent-aqua);
    text-decoration: none;
    transition: color 0.2s;
}

.how-it-works a:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
}

.marketplace {
    padding: 5rem 0;
    background-color: var(--background);
    position: relative;
}

.marketplace::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(51, 52, 248, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(130, 62, 228, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.marketplace .container {
    position: relative;
    z-index: 1;
}

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

.marketplace-header h3 {
    font-size: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.filters-container {
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.filters-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.filter-clear {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-clear:hover {
    background-color: rgba(0, 239, 139, 0.1);
}

.filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 239, 139, 0.2), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
    background-color: var(--surface-hover);
    box-shadow: 0 0 12px rgba(51, 52, 248, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-aqua));
    border-color: var(--primary-color);
    color: var(--background);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 239, 139, 0.4);
}

.filter-btn:nth-child(2n).active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
}

.filter-btn:nth-child(3n).active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

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

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover::before {
    opacity: 1;
}

.action-card:hover {
    background-color: var(--surface-hover);
    border-color: var(--border-color);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 239, 139, 0.15),
                0 0 0 1px rgba(0, 239, 139, 0.1);
}

.action-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
    min-width: 0;
}

.action-title-wrapper {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.action-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.action-type {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-aqua));
    color: var(--background);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 239, 139, 0.3);
}

.action-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: calc(1.6em * 4); /* Fallback for browsers without line-clamp support */
}

.action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 0;
}

.action-tag {
    background: linear-gradient(135deg, rgba(0, 239, 139, 0.1), rgba(51, 52, 248, 0.1));
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 239, 139, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: all 0.2s;
}

.action-tag:nth-child(2n) {
    background: linear-gradient(135deg, rgba(51, 52, 248, 0.1), rgba(130, 62, 228, 0.1));
    border-color: rgba(51, 52, 248, 0.2);
}

.action-tag:nth-child(3n) {
    background: linear-gradient(135deg, rgba(130, 62, 228, 0.1), rgba(244, 198, 250, 0.1));
    border-color: rgba(130, 62, 228, 0.2);
}

.action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    position: relative;
}

.action-link::after {
    content: '→';
    transition: transform 0.2s, color 0.2s;
    color: var(--accent-blue-light);
}

.action-link:hover {
    color: var(--accent-aqua);
}

.action-link:hover::after {
    transform: translateX(4px);
    color: var(--accent-purple);
}

.action-link::after {
    content: '→';
    transition: transform 0.2s;
}

.action-link:hover::after {
    transform: translateX(4px);
}

.action-path {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    word-break: break-all;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-message {
    text-align: center;
    padding: 2rem;
    background-color: var(--surface);
    border: 1px solid var(--error);
    border-radius: 12px;
    color: var(--error);
}

.about {
    padding: 5rem 0;
    background-color: var(--background);
}

.about h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.about p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    max-width: 800px;
}

.resources h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.resources ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resources li a {
    color: var(--accent-aqua);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.resources li a:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
}

.resources li:nth-child(2) a {
    color: var(--accent-blue-light);
}

.resources li:nth-child(2) a:hover {
    color: var(--accent-purple);
}

.resources li:nth-child(3) a {
    color: var(--accent-purple);
}

.resources li:nth-child(3) a:hover {
    color: var(--accent-pink);
}

footer {
    background-color: var(--background);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 5rem;
    text-align: center;
}

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

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

footer a {
    color: var(--accent-aqua);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-blue-light);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.25rem;
    }
    
    .marketplace-header h3,
    .how-it-works h3,
    .about h3 {
        font-size: 2rem;
    }
    
    .filters-container {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .filters-list {
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.85rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .marketplace-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

