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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.logo {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 350px;
}

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

.tabs button {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.tabs button.active {
    background: #667eea;
    color: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #5568d3;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.role-description {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.dashboard-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 500px;
    max-width: 800px;
}

.user-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.user-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.role-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.logout-btn {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

.role-selection-prompt {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.role-selection-prompt h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.dashboard-content {
    margin-top: 20px;
}

.quick-actions {
    text-align: left;
}

.quick-actions h3 {
    color: #333;
    margin-bottom: 15px;
}

.quick-actions div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #5568d3;
    transform: translateX(5px);
}

.navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.nav-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #e0e0e0;
}

.nav-btn.active {
    background: #667eea;
    color: white;
}

.nav-btn.logout {
    margin-left: auto;
    background: #dc3545;
    color: white;
}

.nav-btn.logout:hover {
    background: #c82333;
}

.profile-view {
    text-align: left;
}

.profile-view h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.profile-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.stats-view {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stats-view h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.action-btn:disabled:hover {
    background: #ccc;
    transform: none;
}

.events-view,
.create-event-view,
.witness-talks-view,
.create-witness-talk-view,
.meditations-view,
.create-meditation-view {
    text-align: left;
}

.events-view h2,
.create-event-view h2,
.witness-talks-view h2,
.create-witness-talk-view h2,
.meditations-view h2,
.create-meditation-view h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.events-list,
.witness-talks-list,
.meditations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.event-card,
.talk-card,
.meditation-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover,
.talk-card:hover,
.meditation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.event-card h3,
.talk-card h3,
.meditation-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.event-details,
.talk-details,
.meditation-details {
    margin-bottom: 15px;
}

.event-details p,
.talk-details p,
.meditation-details p {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.5;
}

.event-form,
.witness-talk-form,
.meditation-form {
    max-width: 600px;
    margin: 0 auto;
}

.questions {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
}

.questions ol {
    margin-left: 20px;
    margin-top: 10px;
}

.questions li {
    margin-bottom: 8px;
    color: #555;
}

.question-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.question-viewer {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.question-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: white;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.meditation-info {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.meditation-info .leader {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.meditation-info .event-info {
    color: #666;
    font-size: 0.95rem;
}

.questions-container {
    padding: 30px 25px;
}

.questions-container h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
}

.question-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: start;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.question-number {
    background: white;
    color: #667eea;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.question-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0;
}

.share-section {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 15px 15px;
}

.share-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.share-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-url {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #5568d3;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.qr-code-container img {
    max-width: 250px;
    border: 3px solid #667eea;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

@media (max-width: 600px) {
    .question-viewer {
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .question-header h2 {
        font-size: 1.4rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .question-number {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .share-url-container {
        flex-direction: column;
    }
}
