:root {
    --primary-color: #4A6741;
    --primary-light: #6B8E60;
    --secondary-color: #F5F5DC;
    --accent-color: #D4AF37;
    --text-color: #2D3436;
    --text-light: #636E72;
    --bg-color: #F8F9FA;
    --card-bg: rgba(255, 255, 255, 0.9);
    --success-color: #27ae60;
    --urgent-color: #e74c3c;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Variables for Landing Page Aurora */
    --deep-sky: #080c14;
    --aurora-green: #00ffcc;
    --aurora-purple: #a855f7;
    --aurora-blue: #3b82f6;
}

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

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

body {
    background-color: var(--bg-color); /* Main app uses this */
    color: var(--text-color);
    min-height: 100vh;
}

/* Beautiful Moving Aurora Background (Landing only) */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

.aurora-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 255, 204, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    filter: blur(100px);
    animation: aurora-dance 25s infinite alternate ease-in-out;
}

@keyframes aurora-dance {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

/* Star Field */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: radial-gradient(white, rgba(255,255,255,0) 2px);
    background-size: 150px 150px;
    background-position: 0 0, 30px 60px, 90px 120px;
    opacity: 0.1;
}

/* Landing Page Section */
.hero-section {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 15000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(to bottom, transparent, rgba(2, 6, 23, 0.9));
    color: white;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    text-transform: uppercase;
    opacity: 0.7;
    animation: fadeInUp 1.2s ease-out;
}

.btn-enter {
    padding: 1rem 3.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeInUp 1.4s ease-out;
}

.btn-enter:hover {
    background: white;
    color: var(--deep-sky);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1);
}

/* Auth Overlay Styles Refined */
#auth-overlay {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(20px);
}

/* Original App Layout */
.app-wrapper {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    height: 100vh;
    padding: 1.5rem;
    gap: 1.5rem;
    z-index: 10;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
    animation: slideInLeft 0.5s ease-out;
    border: none;
}

.sidebar-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.member-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-right: 0.5rem;
}

.member-item {
    padding: 1rem;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    color: var(--text-color);
}

.member-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.member-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name { font-weight: 600; }
.member-stats { font-size: 0.75rem; opacity: 0.8; }

.add-member-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.header-container {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeInDown 0.6s ease-out;
}

.header-container h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.header-info p {
    color: var(--text-light);
}

.stats-summary {
    display: flex;
    gap: 2rem;
}

.stat-item { text-align: right; }
.stat-item span { display: block; }
.stat-val { font-size: 1.3rem; font-weight: 700; color: var(--primary-color); }
.stat-lbl { font-size: 0.8rem; color: var(--text-light); }

.prayer-view {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    border: none;
}

/* Forms */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-row {
    display: flex;
    gap: 1rem;
}

input[type="text"], input[type="password"], select {
    padding: 0.8rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
    background: white;
    color: var(--text-color);
}

input[type="text"]:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); }

.filter-btn {
    background: transparent;
    color: var(--text-light);
}

.filter-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

/* List Items */
.prayer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prayer-item {
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.4s ease-out forwards;
    border-left: 5px solid transparent;
}

.prayer-item.answered {
    background: #f1f8e9;
    border-left-color: var(--success-color);
    opacity: 0.8;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-cat { background: #f0f0f0; color: #666; margin-right: 0.5rem; }

.check-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.check-btn.active {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Admin Modal */
#admin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ddd;
    padding: 2.5rem;
    border-radius: 24px;
    z-index: 11000;
    display: none;
    width: 380px;
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}

#admin-modal h3 {
    color: var(--primary-color);
}

#admin-modal input[type="text"] {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: var(--text-color);
}

.admin-trigger {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    opacity: 0.2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.admin-trigger:hover { opacity: 1; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 900px) {
    .app-wrapper { flex-direction: column; height: auto; padding: 1rem; }
    .sidebar { width: 100%; height: 400px; }
}
