:root {
    --primary-web3: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --surface-dark: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-dark: #334155;
    --success-glow: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

header {
    background-color: var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-web3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.3rem;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary-web3);
}

.btn-connect {
    background: linear-gradient(135deg, var(--primary-web3) 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.hero {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent), var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.filter-section {
    max-width: 1200px;
    margin: -2rem auto 3rem auto;
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.7rem 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-light);
    outline: none;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-dark);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-web3);
    color: white;
    border-color: var(--primary-web3);
}

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

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

.course-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.course-thumb {
    width: 100%;
    height: 160px;
    background-color: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-weight: bold;
    position: relative;
    border-bottom: 1px solid var(--border-dark);
}

.course-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-web3);
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
}

.course-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.course-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.course-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-dark);
    padding-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.course-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--success-glow);
}

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

.btn-more {
    flex: 1; /* Alinhamento uniforme de tamanho com o btn-enroll */
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-more:hover {
    background-color: var(--border-dark);
}

.btn-enroll {
    flex: 1;
    background-color: var(--primary-web3);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-enroll:hover {
    background-color: var(--primary-hover);
}

/* Seção Depoimentos */
.testimonials-section {
    max-width: 1200px;
    margin: 0 auto 6rem auto;
    padding: 0 1rem;
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 800;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.testimonial-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.student-wallet {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary-web3);
    margin-bottom: 0.5rem;
    display: block;
}

.testimonial-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

/* Footer */
footer {
    background-color: var(--surface-dark);
    border-top: 1px solid var(--border-dark);
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-light);
}

/* Ajuste de contraste para o estado desabilitado */
.btn-enroll:disabled {
    background-color: var(--border-dark);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}


/* Barra de Aviso Sepolia */
.network-banner {
    background-color: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center; /* CORRIGIDO AQUI */
    gap: 0.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.network-banner strong {
    color: #fbbf24;
    font-weight: 700;
}

.network-banner .banner-icon {
    flex-shrink: 0;
}

/* Estilização do Link do Faucet (Azul Claro) */
.network-banner .faucet-link {
    color: #38bdf8;
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.network-banner .faucet-link:hover {
    color: #7dd3fc;
    text-decoration: none;
}
