:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #777777;
    --success: #28a745;
    --error: #dc3545;
    --white: #ffffff;
}

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

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

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
}

.auth-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-box h1 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1.1em;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-large {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--white);
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-large:hover {
    opacity: 0.9;
}

.link-text {
    margin-top: 15px;
}

.link-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

/* Dashboard */
.dashboard-header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.profile-pic-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.btn-logout {
    color: var(--error);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--error);
    padding: 5px 15px;
    border-radius: 20px;
}

.dashboard-page .container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: #e0e0e0;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    color: #555;
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.post-form {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.upload-box {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
}

.upload-label span {
    font-size: 1.2em;
    color: #555;
}

/* Public Headers */
.main-header {
    background: linear-gradient(to right, #1a2980, #26d0ce);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.btn-small {
    background: rgba(255,255,255,0.25);
    color: var(--white);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.btn-small:hover {
    background: rgba(255,255,255,0.4);
}

/* UPDATED Index Grid Styles */
.preacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
}

.preacher-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.preacher-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
}

.preacher-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-banner {
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.preacher-avatar {
    width: 90px;
    height: 90px;
    margin: -45px auto 0;
    position: relative;
    padding: 4px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.preacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.preacher-info {
    padding: 20px;
    text-align: center;
}

.preacher-info h3 {
    margin-bottom: 5px;
    font-size: 1.2em;
    color: #222;
    font-weight: 700;
}

.role-badge {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 20px;
    display: block;
}

.btn-view {
    display: inline-block;
    padding: 8px 25px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3);
    transition: background 0.3s, transform 0.2s;
}

.preacher-card:hover .btn-view {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.page-title {
    text-align: center;
    margin: 40px 0 20px;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* Profile Page Styles */
.main-header.small {
    padding: 15px;
    text-align: left;
}

.profile-hero {
    background: linear-gradient(to bottom, #26d0ce, #f4f7f6);
    padding: 60px 20px;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: 30px;
}

.profile-pic-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

.profile-hero-content h1 {
    color: #333;
    margin-bottom: 5px;
    font-weight: 800;
}

/* Pix Box Styles */
.pix-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(5px);
}

.pix-box h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.pix-box p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.pix-key-wrapper {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px dashed #ccc;
}

.pix-key-wrapper span {
    font-size: 0.8em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2px;
}

.pix-key {
    font-family: monospace;
    font-size: 1.2em;
    color: #333;
    word-break: break-all;
}

.profile-columns {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.column-text, .column-audio {
    flex: 1;
}

.section-title {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: #444;
    font-weight: 700;
    display: inline-block;
}

/* Cards within columns */
.post-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.text-card {
    border-left: 5px solid var(--primary-color);
}

.audio-card {
    border-left: 5px solid var(--secondary-color);
}

.post-title-small {
    font-size: 1.3em;
    margin: 5px 0 10px;
    color: #222;
    font-weight: 600;
}

.post-title-audio {
    font-size: 1.2em;
    margin: 0;
    color: #222;
    font-weight: 600;
}

.post-date-small {
    font-size: 0.8em;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

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

.audio-desc {
    font-size: 0.95em;
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.custom-audio-small {
    width: 100%;
    height: 40px;
    border-radius: 20px;
}

.empty-msg {
    color: #888;
    text-align: center;
    font-style: italic;
    background: #e9ecef;
    padding: 30px;
    border-radius: 10px;
}

.main-footer {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: 50px;
    background: var(--white);
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .profile-columns {
        flex-direction: column;
    }
    
    .preacher-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }

    .main-header.small {
        text-align: center;
    }
    
    .profile-hero {
        clip-path: none;
        padding-bottom: 40px;
    }
}
