:root {
    --primary-color: #2380C2;
    --secondary-color: #1a5f91;
    --accent-color: #ffd700;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-weight: 800;
    font-size: 22px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-light);
    margin-left: 25px;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #dc3545;
}

/* Dashboard / Content */
.dashboard-welcome {
    margin: 60px 0 40px;
    text-align: center;
}

.dashboard-welcome h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #111;
}

.dashboard-welcome p {
    font-size: 18px;
    color: var(--text-light);
}

.content-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

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

.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

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

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
}

.audio-placeholder {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.card-body p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badgex {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: var(--border-color);
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Resources Page */
.content-header {
    margin: 50px 0 40px;
    text-align: center;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}


/* Content Badges */
.content-card {
    position: relative;
    /* For absolute positioning of badge */
}

.content-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-free {
    background-color: #28a745;
}

.badge-premium {
    background-color: #ffc107;
    color: #333;
}

.search-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.search-form .btn {
    width: auto;
    border-radius: 8px;
    padding: 0 25px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-color);
    /* Cleaner bg */
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* Pricing */
.pricing-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 60px;
}

.plan-card {
    max-width: 350px;
    transition: transform 0.2s;
}

.plan-card:hover {
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
}

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

.btn:active {
    transform: scale(0.98);
}

.premium-lock {
    background: #f8f9fa;
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin-bottom: 30px;
    display: none;
    /* Controlled by JS or inline style from server */
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.lock-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    /* Stack them for better mobile view or user preference? User said "corner the login text on the right". Flex row is default. */
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* User said Subscribe "corners" the login text. Maybe row with auto width is better. */
@media (min-width: 480px) {
    .lock-actions {
        flex-direction: row;
    }
}

.lock-actions .btn {
    width: auto;
    /* Don't stretch */
    padding: 12px 30px;
}

#login-to-view {
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    margin-left: 0;
    /* Override generic btn-text margin if any */
    transition: all 0.2s;
}

#login-to-view:hover {
    background-color: #f0f7fb;
    color: var(--secondary-color);
}

/* Forms (Login/Register) */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 90%;
    /* Box sizing might make 100% overflow padding */
    box-sizing: border-box;
    /* Crucial for inputs */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 128, 194, 0.1);
}

.auth-links {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Nav Layout */
.header-container nav {
    display: flex;
    align-items: center;
}

/* Audio Fixes */
.audio-cover {
    width: 200px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.audio-placeholder-icon {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}