:root {
        --primary-color: #4CAF50;
        --primary-dark: #388E3C;
        --text-color: #333;
        --light-gray: #f4f4f4;
        --border-color: #ddd;
        --header-bg: #4CAF50;
        --header-text: white;
    }

    * {
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        background-color: var(--light-gray);
        color: var(--text-color);
        font-size: 14px;
        overflow-x: hidden;
    }

    #app {
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        background-color: white;
        position: relative;
    }

    /* Header styling */
    .app-header {
        background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
        color: white;
        padding: 20px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .app-header h1 {
        margin: 0;
        font-size: 1.8em;
        font-weight: 600;
    }

    /* Hide header when prayer management section is active */
    #prayer-management-section:not([style*="display: none"]) ~ .app-header,
    #prayer-management-section:not([style*="display: none"]) .app-header {
        display: none;
    }



    /* Login section */
    #login-section {
        width: 100%;
        max-width: 320px;
        padding: 20px;
        margin: 40px auto;
        text-align: center;
        border-radius: 12px;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    #login-form {
        display: flex;
        flex-direction: column;
    }

    #login-form input {
        margin-bottom: 15px;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    #login-form button {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 14px;
        border-radius: 8px;
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #login-form button:hover,
    #login-form button:active {
        background-color: var(--primary-dark);
    }

    #login-message {
        margin-top: 15px;
        font-size: 14px;
        color: #f44336;
    }

    /* Registration section */
    #registration-section {
        width: 100%;
        max-width: 400px;
        padding: 20px;
        margin: 40px auto;
        text-align: center;
        border-radius: 12px;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }

    #registration-form {
        display: flex;
        flex-direction: column;
    }

    #registration-form input,
    #registration-form select {
        margin-bottom: 15px;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
    }

    #registration-form button {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 14px;
        border-radius: 8px;
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        margin-bottom: 10px;
    }

    #registration-form button:hover,
    #registration-form button:active {
        background-color: var(--primary-dark);
    }

    #registration-message {
        margin-top: 15px;
        font-size: 14px;
    }

    .secondary-btn {
        background-color: transparent !important;
        color: var(--primary-color) !important;
        border: 2px solid var(--primary-color) !important;
    }

    .secondary-btn:hover,
    .secondary-btn:active {
        background-color: var(--primary-color) !important;
        color: white !important;
    }

    .link-btn {
        background: none !important;
        border: none !important;
        color: var(--primary-color) !important;
        text-decoration: underline !important;
        font-size: 14px !important;
        padding: 5px !important;
        margin-top: 10px !important;
    }

    /* Enhanced Email verification section */
    #email-verification-section {
        width: 100%;
        max-width: 400px;
        padding: 30px 20px;
        margin: 40px auto;
        text-align: center;
        border-radius: 12px;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }

    #email-verification-section h2 {
        margin: 0 0 15px 0;
        font-size: 24px;
        font-weight: 600;
        color: var(--text-color);
    }

    /* Email display styling */
    .verification-instructions {
        margin-bottom: 25px;
        color: #666;
        font-size: 15px;
        line-height: 1.5;
    }

    .verification-email-display {
        font-weight: 600;
        color: var(--primary-color);
        word-break: break-word;
    }

    /* Enhanced verification code input */
    .verification-code-input {
        display: flex;
        justify-content: center;
        margin: 30px 0;
        gap: 12px;
        flex-wrap: wrap;
    }

    .verification-code-input input {
        width: 50px;
        height: 50px;
        text-align: center;
        font-size: 24px;
        font-weight: bold;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        background-color: #fafafa;
        transition: all 0.3s ease;
        outline: none;
    }

    .verification-code-input input:focus {
        border-color: var(--primary-color);
        background-color: white;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
        transform: scale(1.05);
    }

    .verification-code-input input:valid {
        border-color: var(--primary-color);
        background-color: rgba(76, 175, 80, 0.05);
    }

    /* Verify button styling consistent with login */
    .verify-btn {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 14px 20px;
        border-radius: 8px;
        font-weight: bold;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        margin-bottom: 15px;
        position: relative;
        overflow: hidden;
    }

    .verify-btn:hover,
    .verify-btn:active {
        background-color: var(--primary-dark);
        transform: translateY(-1px);
    }

    .verify-btn:disabled {
        background-color: #cccccc;
        cursor: not-allowed;
        transform: none;
    }

    /* Loading state for verify button */
    .verify-btn.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .verify-btn.loading {
        color: transparent;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* Resend code link */
    .resend-code {
        color: var(--primary-color);
        text-decoration: none;
        background: none;
        border: none;
        font-size: 14px;
        cursor: pointer;
        margin: 15px 0;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.3s ease;
        display: inline-block;
    }

    .resend-code:hover {
        background-color: rgba(76, 175, 80, 0.1);
        text-decoration: underline;
    }

    .resend-code:disabled {
        color: #999;
        cursor: not-allowed;
        opacity: 0.6;
    }

    /* Countdown timer for resend */
    .resend-countdown {
        font-size: 12px;
        color: #999;
        margin-left: 5px;
    }

    /* Icon styling */
    .verification-icon {
        font-size: 48px;
        color: var(--primary-color);
        margin-bottom: 20px;
    }

    /* Progress indicator */
    .progress-steps {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 25px;
        gap: 10px;
    }

    .step {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
    }

    .step.completed {
        background-color: var(--primary-color);
        color: white;
    }

    .step.active {
        background-color: var(--primary-color);
        color: white;
        border: 3px solid rgba(76, 175, 80, 0.3);
    }

    .step.inactive {
        background-color: #e0e0e0;
        color: #999;
    }

    .step-line {
        width: 30px;
        height: 2px;
        background-color: #e0e0e0;
    }

    .step-line.completed {
        background-color: var(--primary-color);
    }

    /* Animation for code input success */
    @keyframes pulse-success {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .verification-code-input input.success {
        animation: pulse-success 0.3s ease;
        border-color: var(--primary-color);
        background-color: rgba(76, 175, 80, 0.1);
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }

    /* User info bar */
    .user-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        background-color: rgba(76, 175, 80, 0.1);
        border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    }

    .user-info h2 {
        margin: 0;
        font-size: 14px;
        color: var(--text-color);
        font-weight: 600;
    }

    /* Clickable username styling */
    .clickable-username {
        color: white;
        cursor: pointer;
        text-decoration: underline;
        transition: all 0.3s ease;
        padding: 2px 4px;
        border-radius: 4px;
    }

    .clickable-username:hover {
        background-color: rgba(255, 255, 255, 0.1);
        text-decoration: none;
    }

    .logout-btn {
        background-color: transparent;
        color: #f44336;
        padding: 5px 10px;
        border: 1px solid #f44336;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
    }

    /* Prayer management section */
    #prayer-management-section {
        flex: 1;
        width: 100%;
        position: relative;
        padding-bottom: 80px;
        /* Space for floating button */
    }

    /* Prayer list */
    .empty-message {
        text-align: center;
        padding: 30px 20px;
        color: #757575;
        font-style: italic;
    }

    /* Card style for prayers */
    .prayer-card {
        margin: 10px 15px;
        border-radius: 10px;
        background-color: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .prayer-content {
        padding: 15px;
    }

    .prayer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .prayer-sequence {
        font-size: 12px;
        color: #757575;
    }

    .prayer-priority {
        display: inline-block;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: bold;
        text-align: center;
        background-color: #f0f0f0;
    }

    /* Updated priority classes - 1-3 is highest (red), 8-10 is lowest (blue) */
    .priority-high {
        background-color: #ffcdd2;
        color: #c62828;
    }

    .priority-medium {
        background-color: #fff9c4;
        color: #f57f17;
    }

    .priority-low {
        background-color: #e0f7fa;
        color: #0277bd;
    }

    .prayer-text {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 15px;
        color: #333;
        white-space: pre-wrap;
    }

    .prayer-dates {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #757575;
        margin-bottom: 12px;
    }

    .prayer-actions {
        display: flex;
        justify-content: space-between;
        border-top: 1px solid #f0f0f0;
        padding-top: 10px;
    }

    .prayer-actions button {
        flex: 1;
        margin: 0 5px;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 500;
    }

    .edit-btn {
        background-color: #e3f2fd;
        color: #1565c0;
        border: none;
    }

    .archive-btn {
        background-color: #fafafa;
        color: #616161;
        border: none;
    }

    /* Floating action button */
    .floating-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: var(--primary-color);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        border: none;
        font-size: 24px;
        z-index: 1000;
        transition: all 0.3s ease;
    }

    .floating-btn:active {
        transform: scale(0.95);
        background-color: var(--primary-dark);
    }

    /* Forms */
    .modal-form {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow-y: auto;
        padding: 20px 0;
    }

    .modal-form.active {
        opacity: 1;
        visibility: visible;
    }

    .form-container {
        width: 90%;
        max-width: 500px;
        background-color: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transform: translateY(20px);
        transition: all 0.3s ease;
        margin: auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        position: relative;
    }

    .modal-form.active .form-container {
        transform: translateY(0);
    }

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

    .form-header h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .close-btn {
        background: transparent;
        border: none;
        font-size: 22px;
        color: #757575;
        cursor: pointer;
    }

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

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 14px;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        font-family: inherit;
    }

    .form-group input[readonly] {
        background-color: #f5f5f5;
        color: #666;
        cursor: not-allowed;
    }

    /* Enhanced Profile form styling */
    #profile-form .form-container {
        background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
        border: 1px solid rgba(76, 175, 80, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }

    #profile-form .form-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: white;
        margin: -20px -20px 25px -20px;
        padding: 20px;
        border-radius: 12px 12px 0 0;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    #profile-form .form-header::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        pointer-events: none;
    }

    #profile-form .form-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0,0,0,0.2);
        position: relative;
        z-index: 1;
    }

    #profile-form .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(255,255,255,0.2);
        color: white;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.3s ease;
        z-index: 2;
    }

    #profile-form .close-btn:hover {
        background: rgba(255,255,255,0.3);
        transform: scale(1.1);
    }

    /* Enhanced form groups for profile */
    #profile-form .form-group {
        margin-bottom: 20px;
        position: relative;
        transition: all 0.3s ease;
    }

    #profile-form .form-group:hover {
        transform: translateY(-1px);
    }

    #profile-form .form-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 14px;
        color: #2c3e50;
        position: relative;
    }

    #profile-form .form-group label::before {
        content: '';
        width: 3px;
        height: 16px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        border-radius: 2px;
        opacity: 0.7;
    }

    #profile-form .form-group input,
    #profile-form .form-group select {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid #e1e8ed;
        border-radius: 10px;
        font-size: 15px;
        font-family: inherit;
        background: #ffffff;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    #profile-form .form-group input:focus,
    #profile-form .form-group select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1), 0 4px 12px rgba(0,0,0,0.08);
        transform: translateY(-1px);
    }

    #profile-form .form-group input[readonly] {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        color: #6c757d;
        cursor: not-allowed;
        border-color: #dee2e6;
        position: relative;
    }

    #profile-form .form-group input[readonly]::after {
        content: '🔒';
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.5;
    }

    /* Enhanced section divider */
    #profile-form .form-section-divider {
        margin: 30px -20px 25px -20px;
        padding: 20px 20px;
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.02) 100%);
        border-top: 3px solid rgba(76, 175, 80, 0.2);
        border-bottom: 1px solid rgba(76, 175, 80, 0.1);
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(10px);
    }

    #profile-form .form-section-divider h3 {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: var(--primary-dark);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #profile-form .form-section-divider h3 i {
        font-size: 20px;
        padding: 8px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }

    #profile-form .section-note {
        color: #666;
        font-style: italic;
        font-size: 13px;
        margin: 0;
        opacity: 0.8;
    }

    #profile-form .field-note {
        color: #6c757d;
        font-size: 12px;
        margin-top: 6px;
        display: flex;
        align-items: center;
        gap: 5px;
        font-style: italic;
    }

    #profile-form .field-note::before {
        content: 'ℹ️';
        font-size: 12px;
    }

    /* Enhanced form buttons */
    #profile-form .form-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        margin-top: 30px;
        padding: 20px 0 0 0;
        border-top: 2px solid rgba(76, 175, 80, 0.1);
        position: sticky;
        bottom: 0;
        background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,1) 50%);
        backdrop-filter: blur(10px);
        z-index: 10;
    }

    #profile-form .save-btn {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: white;
        border: none;
        padding: 14px 24px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

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

    #profile-form .save-btn:hover::before {
        left: 100%;
    }

    #profile-form .save-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    }

    #profile-form .save-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }

    #profile-form .cancel-btn {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        color: #495057;
        border: 2px solid #dee2e6;
        padding: 12px 22px;
        border-radius: 10px;
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
    }

    #profile-form .cancel-btn:hover {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
        border-color: #adb5bd;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* Enhanced form messages */
    #profile-form .form-message {
        margin-top: 20px;
        padding: 16px 20px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        display: none;
        position: sticky;
        bottom: 80px;
        z-index: 5;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        backdrop-filter: blur(10px);
    }

    #profile-form .form-message.success {
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
        border: 2px solid rgba(76, 175, 80, 0.3);
        color: #2e7d32;
        display: block;
    }

    #profile-form .form-message.success::before {
        content: '✅ ';
        margin-right: 8px;
    }

    #profile-form .form-message.error {
        background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(244, 67, 54, 0.05) 100%);
        border: 2px solid rgba(244, 67, 54, 0.3);
        color: #c62828;
        display: block;
    }

    #profile-form .form-message.error::before {
        content: '❌ ';
        margin-right: 8px;
    }

    /* Enhanced scrollbar for profile form */
    #profile-form .form-container::-webkit-scrollbar {
        width: 8px;
    }

    #profile-form .form-container::-webkit-scrollbar-track {
        background: rgba(76, 175, 80, 0.1);
        border-radius: 4px;
    }

    #profile-form .form-container::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    #profile-form .form-container::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, var(--primary-dark), #2e7d32);
    }

    /* Loading state enhancements */
    #profile-form .save-btn:disabled {
        background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    /* Input focus animations */
    @keyframes inputFocus {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }

    #profile-form .form-group input:focus,
    #profile-form .form-group select:focus {
        animation: inputFocus 0.3s ease;
    }

    /* Success save animation */
    @keyframes successPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    #profile-form .form-message.success {
        animation: successPulse 0.5s ease;
    }

    /* Form buttons sticky positioning for long forms */
    .form-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 25px;
        padding: 15px 0 0 0;
        border-top: 1px solid #f0f0f0;
        position: sticky;
        bottom: 0;
        background-color: white;
        z-index: 1;
    }

    /* Smooth scrolling for form container */
    .form-container {
        scroll-behavior: smooth;
    }

    /* Custom scrollbar for webkit browsers */
    .form-container::-webkit-scrollbar {
        width: 6px;
    }

    .form-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .form-container::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

    .form-container::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    /* Priority selector styling */
    .priority-selector {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
    }

    .priority-slider {
        flex: 1;
        -webkit-appearance: none;
        appearance: none;
        height: 6px;
        /* Updated gradient - red to yellow to blue (1=high to 10=low) */
        background: linear-gradient(to right, #ffcdd2, #fff9c4, #e0f7fa);
        outline: none;
        border-radius: 10px;
    }

    .priority-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--thumb-color, #4CAF50);
        cursor: pointer;
        border: 2px solid white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .priority-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--thumb-color, #4CAF50);
        cursor: pointer;
        border: 2px solid white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* Answered prayer styling */
    .prayer-card.answered,
    .room-prayer-card.answered {
        background: #e8f5e9 !important;
        border: 2px solid #43a047 !important;
        box-shadow: 0 2px 12px rgba(67, 160, 71, 0.08);
    }

    .prayer-card.answered .prayer-content,
    .room-prayer-card.answered .prayer-content {
        background-color: transparent;
    }

    .prayer-card.answered .prayer-header,
    .room-prayer-card.answered .prayer-header {
        border-bottom-color: rgba(76, 175, 80, 0.3);
    }

    .prayer-card.answered .prayer-actions,
    .room-prayer-card.answered .prayer-actions {
        border-top-color: rgba(76, 175, 80, 0.3);
    }

    /* Optional: Add an answered badge */
    .answered-badge {
        display: inline-block;
        background-color: #4CAF50;
        color: white;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 10px;
        font-weight: bold;
        margin-left: 8px;
    }

    .priority-value {
        width: 85px;
        text-align: center;
    }

    .priority-value span {
        font-size: 24px;
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

    .priority-indicator {
        font-size: 12px;
        padding: 3px 8px;
        border-radius: 12px;
        display: inline-block;
    }

    .checkbox-group {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .form-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 25px;
        padding: 15px 0 0 0;
        border-top: 1px solid #f0f0f0;
        position: sticky;
        bottom: 0;
        background-color: white;
        z-index: 1;
    }

    .form-buttons button {
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .save-btn {
        background-color: var(--primary-color);
        color: white;
        border: none;
    }

    .cancel-btn {
        background-color: #f5f5f5;
        color: #616161;
        border: none;
    }

    /* Toast notifications */
    .toast {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        background-color: #333;
        color: white;
        padding: 12px 20px;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        transition: all 0.3s ease;
        opacity: 0;
        font-size: 14px;
    }

    .toast-success {
        background-color: #4CAF50;
    }

    .toast-error {
        background-color: #f44336;
    }

    /* Install prompt for PWA */
    .install-prompt {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: white;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        display: none;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
    }

    .install-prompt p {
        margin: 0;
        font-size: 14px;
    }

    .install-btn {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 4px;
        font-size: 14px;
    }

    .close-prompt {
        background: transparent;
        border: none;
        color: #757575;
        font-size: 18px;
    }

    /* Pull to refresh indicator */
    .refresh-indicator {
        text-align: center;
        padding: 15px;
        color: #757575;
        font-size: 13px;
        display: none;
    }

    /* Skeleton loading effect */
    @keyframes skeleton-loading {
        0% {
            background-position: -200px 0;
        }

        100% {
            background-position: 200px 0;
        }
    }

    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200px 100%;
        animation: skeleton-loading 1.5s infinite linear;
        border-radius: 4px;
        height: 16px;
        margin-bottom: 8px;
    }

    .skeleton-card {
        margin: 10px 15px;
        border-radius: 10px;
        background-color: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 15px;
    }

    .skeleton-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .skeleton-sequence {
        width: 20%;
        height: 16px;
    }

    .skeleton-priority {
        width: 15%;
        height: 16px;
    }

    .skeleton-text {
        width: 100%;
        height: 16px;
        margin-bottom: 8px;
    }

    .skeleton-text:last-of-type {
        width: 80%;
    }

    .skeleton-dates {
        display: flex;
        justify-content: space-between;
        margin: 15px 0;
    }

    .skeleton-date {
        width: 30%;
        height: 12px;
    }

    .skeleton-actions {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .skeleton-button {
        flex: 1;
        height: 30px;
        border-radius: 4px;
    }

    .success-message {
        color: #4CAF50;
    }

    .error-message {
        color: #f44336;
    }

    .disabled {
        opacity: 0.6;
        pointer-events: none;
    }

    /* Responsive design for verification */
    @media (max-width: 480px) {
        #email-verification-section {
            margin: 20px auto;
            padding: 25px 15px;
        }

        .verification-code-input {
            gap: 8px;
        }

        .verification-code-input input {
            width: 45px;
            height: 45px;
            font-size: 20px;
        }

        .verification-icon {
            font-size: 40px;
        }

        /* Mobile modal adjustments */
        .modal-form {
            padding: 10px 0;
        }

        .form-container {
            width: 95%;
            margin: 10px auto;
            padding: 15px;
            border-radius: 8px;
            max-height: calc(100vh - 20px);
        }

        /* Mobile profile form adjustments */
        #profile-form .form-container {
            width: 98%;
            margin: 5px auto;
            padding: 12px;
        }

        #profile-form .form-header {
            margin: -12px -12px 20px -12px;
            padding: 16px 12px;
        }

        #profile-form .form-header h2 {
            font-size: 18px;
        }

        #profile-form .form-section-divider {
            margin: 25px -12px 20px -12px;
            padding: 16px 12px;
        }

        #profile-form .form-section-divider h3 {
            font-size: 16px;
        }

        #profile-form .form-section-divider h3 i {
            font-size: 16px;
            padding: 6px;
        }

        .form-header h2 {
            font-size: 16px;
        }

        .form-group {
            margin-bottom: 12px;
        }

        .form-group label {
            font-size: 13px;
        }

        .form-group input,
        .form-group select {
            padding: 10px;
            font-size: 14px;
        }

        #profile-form .form-group input,
        #profile-form .form-group select {
            padding: 12px 14px;
            font-size: 14px;
        }

        .form-buttons {
            flex-direction: column;
            gap: 8px;
        }

        .form-buttons button {
            width: 100%;
            padding: 12px;
        }

        #profile-form .form-buttons {
            flex-direction: column;
            gap: 10px;
        }

        #profile-form .save-btn,
        #profile-form .cancel-btn {
            width: 100%;
            padding: 14px;
        }

        .form-section-divider h3 {
            font-size: 14px;
        }
    }
    /* Enhanced textarea styling for prayer input */
.form-group textarea {
    width: 100%;
    min-height: 120px; /* Increased from default */
    max-height: 300px; /* Allow expansion but with limit */
    padding: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    transition: all 0.3s ease;
    resize: vertical; /* Allow vertical resizing */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1), 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    background: #ffffff;
}

.form-group textarea::placeholder {
    color: #95a5a6;
    font-style: italic;
    opacity: 0.8;
}

/* Enhanced label styling for prayer text */
.form-group label[for="prayer-text"],
.form-group label[for="edit-prayer-text"] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    position: relative;
}

.form-group label[for="prayer-text"]::before,
.form-group label[for="edit-prayer-text"]::before {
    content: '🙏';
    font-size: 18px;
    filter: grayscale(0.3);
}

/* Character counter styling */
.textarea-container {
    position: relative;
}

.character-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #95a5a6;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.character-counter.warning {
    color: #f39c12;
}

.character-counter.danger {
    color: #e74c3c;
}

/* Floating label effect */
.form-group.floating-label {
    position: relative;
    margin-top: 20px;
}

.form-group.floating-label label {
    position: absolute;
    top: 16px;
    left: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    color: #95a5a6;
    font-weight: 500;
}

.form-group.floating-label textarea:focus + label,
.form-group.floating-label textarea:not(:placeholder-shown) + label {
    top: -12px;
    left: 12px;
    font-size: 12px;
    color: var(--primary-color);
    background: white;
    padding: 0 4px;
    font-weight: 600;
}

/* Auto-resize functionality */
.auto-resize {
    overflow: hidden;
    resize: none;
}

/* Enhanced mobile responsive design */
@media (max-width: 480px) {
    .form-group textarea {
        min-height: 100px;
        padding: 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-group label[for="prayer-text"]::before,
    .form-group label[for="edit-prayer-text"]::before {
        font-size: 16px;
    }
    
    .character-counter {
        bottom: 6px;
        right: 10px;
        font-size: 11px;
    }
}

/* Success state for textarea */
.form-group textarea.success {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, #ffffff 100%);
}

/* Enhanced focus ring for better accessibility */
.form-group textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improved placeholder styling */
.form-group textarea::-webkit-input-placeholder {
    color: #bdc3c7;
    font-style: italic;
    transition: opacity 0.3s ease;
}

.form-group textarea::-moz-placeholder {
    color: #bdc3c7;
    font-style: italic;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.form-group textarea:focus::-webkit-input-placeholder {
    opacity: 0.5;
}

.form-group textarea:focus::-moz-placeholder {
    opacity: 0.5;
}

/* Scrollbar styling for textarea */
.form-group textarea::-webkit-scrollbar {
    width: 8px;
}

.form-group textarea::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.form-group textarea::-webkit-scrollbar-thumb:hover {
    background: #a0a7ac;
}

/* Loading state for textarea */
.form-group textarea.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite linear;
    pointer-events: none;
}

/* Validation states */
.form-group textarea.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group textarea.valid {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}
/* Enhanced Pull-to-Refresh Indicator Styling */
/* Add these styles to your existing styles.css */

/* Pull to refresh indicator - Enhanced for iOS */
.refresh-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px;
    color: #757575;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: none;
    z-index: 1001;
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
}

.refresh-indicator.active {
    transform: translateY(0);
    display: block;
}

/* iOS specific styles */
@supports (-webkit-touch-callout: none) {
    .refresh-indicator {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
    }
    
    /* Prevent iOS Safari bounce when pull-to-refresh is active */
    body.refreshing {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Ensure proper layering on iOS */
    .refresh-indicator {
        z-index: 1001;
    }

    /* Inactivity warning modal styles */
    #inactivity-warning-modal {
        z-index: 9999;
    }

    #inactivity-warning-modal .form-container {
        max-width: 400px;
        background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
        color: white;
        border: none;
        box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3);
    }

    #inactivity-warning-modal .form-header h2 {
        color: white;
        margin: 0;
    }

    #inactivity-warning-modal .form-content {
        padding: 20px;
        text-align: center;
    }

    #inactivity-warning-modal .form-content p {
        margin: 10px 0;
        font-size: 16px;
        line-height: 1.5;
    }

    #inactivity-warning-modal .form-buttons {
        display: flex;
        gap: 10px;
        justify-content: center;
        padding: 20px;
    }

    #inactivity-warning-modal .save-btn {
        background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    #inactivity-warning-modal .save-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }

    #inactivity-warning-modal .cancel-btn {
        background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    #inactivity-warning-modal .cancel-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    }

    /* Message notification styles */
    .message-notification,
    .unread-notification {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 350px;
        max-width: calc(100vw - 40px);
        background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
        color: white;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3);
        z-index: 10000;
        animation: slideInRight 0.3s ease-out;
        overflow: hidden;
    }

    .unread-notification {
        background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
        box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3);
    }

    .notification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .notification-sender {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        font-size: 14px;
    }

    .notification-room {
        font-size: 12px;
        opacity: 0.8;
        margin-left: 8px;
    }

    .close-notification-btn {
        background: none;
        border: none;
        color: white;
        font-size: 18px;
        cursor: pointer;
        padding: 0;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.2s ease;
    }

    .close-notification-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .notification-content {
        padding: 12px 16px;
        font-size: 14px;
        line-height: 1.4;
        max-height: 100px;
        overflow-y: auto;
    }

    .notification-time {
        padding: 8px 16px;
        font-size: 12px;
        opacity: 0.8;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* Stack multiple notifications */
    .message-notification:nth-child(2) {
        top: 90px;
    }

    .message-notification:nth-child(3) {
        top: 160px;
    }

    .message-notification:nth-child(4) {
        top: 230px;
    }

    .unread-notification:nth-child(2) {
        top: 90px;
    }

    .unread-notification:nth-child(3) {
        top: 160px;
    }

    .unread-notification:nth-child(4) {
        top: 230px;
    }
}

/* Animation for the refresh indicator */
@keyframes refreshPulse {
    0% { opacity: 0.6; transform: translateY(-100%) scale(0.95); }
    50% { opacity: 1; transform: translateY(-50%) scale(1); }
    100% { opacity: 0.8; transform: translateY(0) scale(1); }
}

.refresh-indicator.pulling {
    animation: refreshPulse 0.3s ease-out;
}

/* Loading state for refresh indicator */
.refresh-indicator.loading {
    color: #4CAF50;
    font-weight: 600;
}

.refresh-indicator.loading::before {
    content: '↻ ';
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Prayer management section adjustments for pull-to-refresh */
#prayer-management-section {
    /* Ensure proper scroll behavior on iOS */
    -webkit-overflow-scrolling: touch;
/*    overflow-scrolling: touch; */
    position: relative;
}

/* Prevent overscroll bounce on iOS when needed */
body.no-bounce {
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
}

html.no-bounce {
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
}

/* Enhanced mobile responsive design for refresh indicator */
@media (max-width: 480px) {
    .refresh-indicator {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* Adjust for iPhone notch and safe areas */
    @supports (padding-top: env(safe-area-inset-top)) {
        .refresh-indicator {
            padding-top: calc(12px + env(safe-area-inset-top));
        }
    }
    
    /* Alternative for older iOS versions */
    @supports (padding-top: constant(safe-area-inset-top)) {
        .refresh-indicator {
            padding-top: calc(12px + constant(safe-area-inset-top));
        }
    }
}

/* Specific adjustments for iPhone X and newer models */
@media only screen 
  and (device-width: 375px) 
  and (device-height: 812px) 
  and (-webkit-device-pixel-ratio: 3) {
    .refresh-indicator {
        padding-top: 55px; /* Account for notch */
    }
}

/* iPhone 12/13/14 Pro */
@media only screen 
  and (device-width: 390px) 
  and (device-height: 844px) 
  and (-webkit-device-pixel-ratio: 3) {
    .refresh-indicator {
        padding-top: 55px;
    }
}

/* iPhone 12/13/14 Pro Max */
@media only screen 
  and (device-width: 428px) 
  and (device-height: 926px) 
  and (-webkit-device-pixel-ratio: 3) {
    .refresh-indicator {
        padding-top: 55px;
    }
}

/* Additional visual feedback for better UX */
.refresh-indicator.ready {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(129, 199, 132, 0.1) 100%);
    border-bottom-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    font-weight: 600;
}

.refresh-indicator.ready::before {
    content: '⬇ ';
    margin-right: 5px;
}

/* Smooth transitions for all states */
.refresh-indicator * {
    transition: all 0.2s ease;
}
/* Add these additional CSS rules to your styles.css to prevent browser pull-to-refresh */

/* Critical: Prevent all forms of overscroll behavior */
html {
    overscroll-behavior: none !important;
    overscroll-behavior-y: none !important;
    -webkit-overscroll-behavior: none !important;
    -webkit-overscroll-behavior-y: none !important;
    height: 100%;
    position: relative;
}

body {
    overscroll-behavior: none !important;
    overscroll-behavior-y: none !important;
    -webkit-overscroll-behavior: none !important;
    -webkit-overscroll-behavior-y: none !important;
    height: 100%;
    position: relative;
}

/* Specific prevention for Chrome mobile */
@media screen and (max-width: 768px) {
    html {
        touch-action: pan-x pan-down pinch-zoom;
        -ms-touch-action: pan-x pan-down pinch-zoom;
        overflow-x: hidden;
    }
    
    body {
        touch-action: pan-x pan-down pinch-zoom;
        -ms-touch-action: pan-x pan-down pinch-zoom;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* When prayer management is active, prevent pull-to-refresh */
    #prayer-management-section {
        overscroll-behavior: none !important;
        overscroll-behavior-y: none !important;
        -webkit-overscroll-behavior: none !important;
        -webkit-overscroll-behavior-y: none !important;
        touch-action: pan-x pan-down pinch-zoom;
        -ms-touch-action: pan-x pan-down pinch-zoom;
        position: relative;
        height: 100%;
    }
    
    /* Prevent scroll chaining */
    #prayer-list-container {
        overscroll-behavior: none !important;
        overscroll-behavior-y: none !important;
        -webkit-overscroll-behavior: none !important;
        -webkit-overscroll-behavior-y: none !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS specific styles can go here */
}

/* Smooth transitions for all states */
.refresh-indicator * {
    transition: all 0.2s ease;
}

/* Prayer Room Styles */

/* Prayer Room Navigation */
.prayer-room-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 0 20px;
}

.nav-btn {
    padding: 10px 20px;
    border: 2px solid #4CAF50;
    background: transparent;
    color: #4CAF50;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 150px;
}

.nav-btn:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.nav-btn.active {
    background: #4CAF50;
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* Prayer Room Cards */
.prayer-room-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #4CAF50;
}

.prayer-room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.prayer-room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.prayer-room-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.prayer-room-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.room-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.room-badge.private {
    background: #ff9800;
    color: white;
}

.room-badge.public {
    background: #4CAF50;
    color: white;
}

.room-badge.group {
    background: #2196F3;
    color: white;
}

.room-badge.individual {
    background: #9C27B0;
    color: white;
}

.room-badge.verification {
    background: #f44336;
    color: white;
}

.prayer-room-purpose {
    color: #666;
    margin: 10px 0;
    font-style: italic;
    line-height: 1.4;
}

.prayer-room-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9em;
    color: #888;
}

.prayer-room-creator {
    font-weight: 500;
}

.prayer-room-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.room-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.join-room-btn {
    background: #4CAF50;
    color: white;
}

.join-room-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.view-room-btn {
    background: #2196F3;
    color: white;
}

.view-room-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

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

/* Prayer Room View Modal */
.room-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.room-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.3em;
}

.room-info p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.room-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #888;
}

.room-creator {
    font-weight: 500;
}

.room-type {
    display: flex;
    gap: 8px;
}

.room-prayers-section {
    margin-top: 20px;
}

.room-prayers-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

#room-prayers-container {
    max-height: none;
    height: calc(100vh - 200px);
    overflow-y: auto;
    margin-bottom: 0;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
}

.room-prayer-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.add-prayer-btn {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-prayer-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Prayer Room Creation Form */
#create-room-form .form-group {
    margin-bottom: 20px;
}

#create-room-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#create-room-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

#create-room-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

#create-room-form .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
}

#create-room-form .checkbox-group label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

/* Room Prayer Cards */
.room-prayer-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.room-prayer-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.room-prayer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.room-prayer-author {
    font-weight: 600;
    color: #4CAF50;
    font-size: 0.9em;
}

.room-prayer-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.room-prayer-text {
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}

.room-prayer-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #888;
}

/* Room Prayer Actions (Edit/Archive) */
.room-prayer-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.edit-prayer-btn, .archive-prayer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    margin: 0 6px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    cursor: pointer;
}
.edit-prayer-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.edit-prayer-btn:hover {
    background: #388e3c;
}
.archive-prayer-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.archive-prayer-btn:hover {
    background: #388e3c;
}
.edit-prayer-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    z-index: 10;
}
.edit-prayer-btn:hover::after, .edit-prayer-btn:focus::after {
    opacity: 1;
}
.archive-prayer-btn::after {
    display: none !important;
}
@media (max-width: 600px) {
    .edit-prayer-btn, .archive-prayer-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .room-prayer-actions {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .edit-prayer-btn, .archive-prayer-btn {
        width: 100%;
        font-size: 1em;
        padding: 12px 0;
        justify-content: center;
    }
}

/* Responsive Design for Prayer Rooms */
@media (max-width: 768px) {
    .prayer-room-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .nav-btn {
        max-width: none;
    }
    
    .prayer-room-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .prayer-room-badges {
        align-self: flex-end;
    }
    
    .prayer-room-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .prayer-room-actions {
        flex-direction: column;
    }
    
    .room-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .room-type {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .prayer-room-card {
        padding: 15px;
        margin: 10px 0;
    }
    
    .prayer-room-title {
        font-size: 1.1em;
    }
    
    .room-info {
        padding: 15px;
    }
    
    .room-info h3 {
        font-size: 1.2em;
    }
    
    #create-room-form .form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .room-prayer-card {
        padding: 12px;
    }
}

/* Loading states for prayer rooms */
.prayer-room-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.prayer-room-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty state for prayer rooms */
.prayer-rooms-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.prayer-rooms-empty i {
    font-size: 3em;
    color: #ccc;
    margin-bottom: 20px;
}

.prayer-rooms-empty h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.prayer-rooms-empty p {
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Success/Error messages for prayer room actions */
.room-message {
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-weight: 500;
}

.room-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.room-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animation for prayer room cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prayer-room-card {
    animation: slideInUp 0.3s ease-out;
}

/* Hover effects for interactive elements */
.prayer-room-card:hover .prayer-room-title {
    color: #4CAF50;
}

.room-action-btn:active {
    transform: translateY(0);
}

/* Focus states for accessibility */
.nav-btn:focus,
.room-action-btn:focus,
.add-prayer-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Print styles for prayer rooms */
@media print {
    .prayer-room-nav,
    .prayer-room-actions,
    .add-prayer-btn {
        display: none;
    }
    
    .prayer-room-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Align checkbox and label for Answered in Edit Room Prayer modal */
#edit-room-prayer-form .form-group input[type="checkbox"] {
    vertical-align: middle;
    margin-right: 8px;
    width: 18px;
    height: 18px;
}
#edit-room-prayer-form .form-group label[for="edit-room-prayer-answered"] {
    vertical-align: middle;
    font-weight: 500;
    margin: 0;
    display: inline-block;
}
#edit-room-prayer-form .form-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    #edit-room-prayer-form .form-group {
        flex-direction: row;
        gap: 8px;
    }
}

#edit-room-prayer-form .form-group.floating-label .textarea-container {
    width: 100%;
}
#edit-room-prayer-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 0;
}
#edit-room-prayer-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
}
#edit-room-prayer-form .textarea-container label {
    left: 18px;
    font-size: 1em;
}

@media (max-width: 600px) {
    #edit-room-prayer-form textarea {
        font-size: 15px;
        padding: 12px;
    }
}

.room-prayer-card, .prayer-card {
    position: relative;
}
.room-prayer-actions, .prayer-actions {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    background: none;
    box-shadow: none;
    z-index: 2;
}
.edit-prayer-btn, .archive-prayer-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #555;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    position: relative;
}
.edit-prayer-btn:hover, .edit-prayer-btn:focus {
    background: #2196F3;
    color: #fff;
}
.archive-prayer-btn:hover, .archive-prayer-btn:focus {
    background: #f44336;
    color: #fff;
}
.edit-prayer-btn::after, .archive-prayer-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    z-index: 10;
}
.edit-prayer-btn:hover::after, .edit-prayer-btn:focus::after,
.archive-prayer-btn:hover::after, .archive-prayer-btn:focus::after {
    opacity: 1;
}
@media (max-width: 600px) {
    .room-prayer-actions, .prayer-actions {
        right: 8px;
        bottom: 8px;
        gap: 4px;
    }
    .edit-prayer-btn, .archive-prayer-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 13px;
    }
}

.fab-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: row;
    gap: 16px;
    z-index: 9999;
    /* pointer-events: none; */
    pointer-events: auto;
    background: none;
}
.fab-container .floating-btn, .fab-container .mini-fab {
    pointer-events: auto;
}
.floating-btn, .mini-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4CAF50;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(76,175,80,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin: 0;
    outline: none;
}
.floating-btn:hover, .mini-fab:hover, .floating-btn:focus, .mini-fab:focus {
    background: #388e3c;
    box-shadow: 0 6px 20px rgba(56,142,60,0.22);
}
.mini-fab {
    width: 40px;
    height: 40px;
    font-size: 18px;
    background: #2196F3;
}
.mini-fab:hover, .mini-fab:focus {
    background: #1976D2;
}
@media (max-width: 600px) {
    .fab-container {
        right: 12px;
        bottom: 12px;
        gap: 10px;
    }
    .floating-btn, .mini-fab {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

.room-prayers-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 0 4px;
    position: relative;
}
.inline-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2196F3;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(33,150,243,0.10);
    outline: none;
}
.inline-back-btn:hover, .inline-back-btn:focus {
    background: #1976D2;
    box-shadow: 0 4px 12px rgba(33,150,243,0.18);
}
.room-prayers-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
}
.room-prayers-title a {
    color: #2196F3;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}
.room-prayers-title a:hover, .room-prayers-title a:focus {
    color: #1976D2;
    text-decoration: underline;
}
@media (max-width: 600px) {
    .room-prayers-section-header {
        gap: 6px;
        margin-bottom: 12px;
    }
    .inline-back-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .room-prayers-title {
        font-size: 1em;
    }
    #room-prayers-container {
        height: calc(100vh - 150px);
        padding: 0 2px;
    }
}

/* Make Cancel and Save buttons show hand cursor on hover */
.cancel-btn:hover,
.save-btn:hover {
    cursor: pointer;
}

/* Room Info Modal Custom Styles - Green Background */
#room-info-modal .form-container {
    max-width: 400px;
    padding: 32px 28px 24px 28px;
    border-radius: 18px;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.18);
    position: relative;
    color: #fff;
}
#room-info-modal .form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    margin-bottom: 18px;
    padding-bottom: 8px;
}
#room-info-modal .form-header h2 {
    font-size: 1.3em;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
#room-info-modal .close-btn {
    font-size: 1.5em;
    color: #e0e0e0;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
#room-info-modal .close-btn:hover {
    color: #fff;
}
#room-info-modal .room-info-modal-content {
    font-size: 1.08em;
    color: #388e3c;
    line-height: 1.8;
    background: #fff;
    border-radius: 12px;
    padding: 18px 16px 12px 16px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.10);
}
#room-info-modal .room-info-modal-content h3 {
    color: #2e7d32;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 700;
}
#room-info-modal .room-info-modal-content p {
    margin: 8px 0;
    font-size: 1em;
    color: #388e3c;
}

.prayer-answered-check {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 2px;
}
.prayer-answered-check i {
    color: #43a047;
    font-size: 1.15em;
    filter: drop-shadow(0 2px 4px rgba(67,160,71,0.10));
}
.answered-date {
    color: #43a047;
    font-size: 0.98em;
    font-weight: 500;
    margin-left: 7px;
    vertical-align: middle;
    display: inline-block;
}

.prayer-author, .room-prayer-author {
    color: #888;
    font-size: 0.92em;
    margin-top: 2px;
    margin-bottom: 2px;
    font-style: normal;
    font-weight: normal;
}

#back-to-rooms-inline-btn {
    background: none;
    border: none;
    color: #43a047;
    font-size: 1.3em;
    margin-right: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.18s, color 0.18s;
    vertical-align: middle;
}
#back-to-rooms-inline-btn:hover {
    background: #e8f5e9;
    color: #2e7d32;
}
#back-to-rooms-inline-btn i {
    color: inherit;
    font-size: 1.1em;
    vertical-align: middle;
}

.enter-room-btn {
    background: linear-gradient(90deg, #43a047 0%, #66bb6a 100%);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 10px 22px 10px 18px;
    font-size: 1.08em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(67,160,71,0.08);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.enter-room-btn i {
    font-size: 1.15em;
    margin-right: 4px;
    color: #fff;
}
.enter-room-btn:hover {
    background: linear-gradient(90deg, #388e3c 0%, #43a047 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(67,160,71,0.13);
}

.clickable-room-title {
    color: #43a047;
    cursor: pointer;
    transition: color 0.18s, text-decoration 0.18s;
    font-weight: 500;
}
.clickable-room-title:hover {
    color: #2e7d32;
    text-decoration: underline;
}

.room-title-icon {
    color: #43a047;
    font-size: 1em;
    margin-right: 6px;
    vertical-align: middle;
}

.green-icon-btn {
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 50px;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(76,175,80,0.08);
  transition: background 0.2s, box-shadow 0.2s;
  padding: 0 14px 0 8px;
  gap: 7px;
}
.green-icon-btn:hover, .green-icon-btn:focus {
  background: #388e3c;
  box-shadow: 0 4px 12px rgba(56,142,60,0.15);
  outline: none;
}
.green-icon-btn i {
  color: #fff;
  font-size: 16px;
}
.join-room-caption {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pending-request-status {
  color: #ff9800;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 152, 0, 0.2);
}
.pending-request-status i {
  color: #ff9800;
  font-size: 14px;
}

.clickable-room-title {
    cursor: pointer;
    transition: color 0.2s ease;
}

.clickable-room-title:hover {
    color: #4CAF50;
}

.disabled-room-title {
    color: #999;
    cursor: default;
    opacity: 0.6;
}

.disabled-room-title:hover {
    color: #999;
}

.prayer-rooms-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.prayer-rooms-loading i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.prayer-rooms-loading p {
    font-size: 16px;
    margin: 0;
}

.prayer-rooms-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.prayer-rooms-error i {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 15px;
}

.prayer-rooms-error h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.prayer-rooms-error p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

.retry-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Room Category Sections */
.room-category-section {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.room-category-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.room-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid #4CAF50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-category-title i {
    color: #4CAF50;
    font-size: 1rem;
}

/* Room Menu Styles */
.room-menu-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-menu-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.room-menu-dropdown {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
}

.menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #999;
}

.menu-item.disabled:hover {
    background-color: transparent;
}

.menu-item i {
    color: #666;
    width: 16px;
}

/* Members List Styles */
.members-list {
    max-height: 400px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.member-item:hover {
    background-color: #f8f9fa;
}

.member-item:last-child {
    border-bottom: none;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.member-avatar i {
    color: #2196f3;
    font-size: 1.2em;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.member-username {
    font-size: 0.9em;
    color: #666;
}

.member-role {
    margin-left: 8px;
}

.admin-badge {
    background: #ff5722;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.member-badge {
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Member Info Modal Styles */
.member-info-content {
    padding: 16px 0;
}

.member-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.member-info-item:last-child {
    border-bottom: none;
}

.member-info-item label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.member-info-item span {
    color: #666;
    text-align: right;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-indicator i {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 15px;
}

.loading-indicator p {
    color: #666;
    margin: 0;
    font-size: 0.9em;
}

/* Message Popup Styles */
.message-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
    border: 1px solid #e0e0e0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
}

.message-sender i {
    color: #2196f3;
}

.close-popup-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.close-popup-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.message-content {
    padding: 16px;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-time {
    padding: 8px 16px 16px 16px;
    color: #666;
    font-size: 0.9em;
    border-top: 1px solid #f0f0f0;
}

/* User Info with Unread Messages Styles */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

    .user-info h2 {
        margin: 0;
        font-size: 1.4em;
        font-weight: 600;
        color: white;
        flex: 1;
    }
    
    .welcome-section {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
    }
    
    .welcome-section h2 {
        margin: 0;
        font-size: 1.4em;
        font-weight: 600;
        color: white;
    }

.user-info .unread-messages-container {
    order: 2;
}

.user-info .logout-btn {
    order: 3;
}

.unread-messages-container {
    position: relative;
}

.unread-messages-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

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

.unread-messages-btn i {
    font-size: 1.2em;
}

.unread-messages-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 20px;
}

/* All Messages Modal Styles */
#all-messages-modal {
    z-index: 3000;
}

#all-messages-modal .form-container {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 50%, #388E3C 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
    border-radius: 12px;
}

#all-messages-modal .form-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0;
}

#all-messages-modal .form-header h2 {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#all-messages-modal .close-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#all-messages-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#all-messages-modal .messages-list {
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    margin: 16px;
    padding: 8px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.message-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.message-item.read {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.message-item.unread {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

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

.message-sender-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-sender-name {
    font-weight: 600;
    color: #333;
}

.message-room-name {
    font-size: 0.9em;
    color: #666;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
}

.clickable-room-name {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(76, 175, 80, 0.1);
}

.clickable-room-name:hover {
    background-color: rgba(76, 175, 80, 0.2);
    text-decoration: none;
    transform: translateY(-1px);
}

.message-time {
    font-size: 0.8em;
    color: #999;
}

.message-content {
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Empty messages state styling */
.empty-messages {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-messages i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-messages h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-messages p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .room-menu-dropdown {
        min-width: 180px;
        right: 10px;
    }
    
    .message-popup {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .member-item {
        padding: 10px;
    }
    
    .member-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
}

.member-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.member-item:hover {
    background-color: #f8f9fa;
}

.member-item:last-child {
    border-bottom: none;
}

.clickable-member {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-member:hover {
    background-color: #e3f2fd;
    transform: translateX(4px);
}

.clickable-member:active {
    background-color: #bbdefb;
    transform: translateX(2px);
}

/* Ensure member info modal displays properly */
#member-info-modal {
    z-index: 3000;
}

#member-info-modal .form-container {
    max-width: 400px;
    width: 90%;
}

#member-info-modal .member-info-content {
    max-height: 60vh;
    overflow-y: auto;
}

/* Ensure members modal has lower z-index than member info modal */
#members-modal {
    z-index: 1500;
}

/* Delete button styles */
.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.delete-btn:hover,
.delete-btn:focus {
    background-color: #c82333;
}

.delete-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Delete room modal content styles */
#delete-room-modal .form-content {
    padding: 16px 0;
}

#delete-room-modal .form-content p {
    margin: 8px 0;
    color: #333;
}

#delete-room-modal .form-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

#delete-room-modal .form-content li {
    margin: 4px 0;
    color: #666;
}

#delete-room-modal .form-content strong {
    color: #dc3545;
}


.room-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    display: none;
}

.room-menu.show {
    display: block;
}

.room-menu-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.room-menu-item:last-child {
    border-bottom: none;
}

.room-menu-item:hover {
    background: #f8f9fa;
}

.room-menu-item i {
    width: 16px;
    text-align: center;
}

/* Clear Messages Button Styles */
.modal-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 0 8px 8px;
}

.clear-messages-btn {
    width: 100%;
    padding: 12px 16px;
    background: rgba(76, 175, 80, 0.2) !important;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none !important;
}

.clear-messages-btn:hover {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: none !important;
}

.clear-messages-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

.clear-messages-btn i {
    font-size: 16px;
}

@media (max-width: 480px) {
    .clear-messages-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
}