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

:root {
    --primary-purple: #8b5cf6;
    --deep-purple: #6d28d9;
    --dark-bg: #0f0f23;
    --card-bg: rgba(30, 30, 60, 0.7);
    --accent-gold: #fbbf24;
    --text-light: #e0e7ff;
    --border-glow: rgba(139, 92, 246, 0.3);
}

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a0b2e 50%, #16213e 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated starry background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent);
    background-size: 200px 200px;
    animation: twinkle 20s infinite;
    opacity: 0.5;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.main-title {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--primary-purple), #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s infinite;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

@keyframes shimmer {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-gold);
    font-style: italic;
    opacity: 0.9;
}

.practice-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 25px;
    background: var(--card-bg);
    border: 2px solid var(--border-glow);
    color: var(--text-light);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--primary-purple);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--deep-purple));
    box-shadow: 0 0 20px var(--border-glow);
}

.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
}

#searchInput {
    width: 100%;
    padding: 15px 25px;
    background: var(--card-bg);
    border: 2px solid var(--border-glow);
    border-radius: 30px;
    color: var(--text-light);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 20px var(--border-glow);
}

#searchInput::placeholder {
    color: rgba(224, 231, 255, 0.5);
}

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

.practice-card {
    background: var(--card-bg);
    border: 2px solid var(--border-glow);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.practice-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.practice-card:hover::before {
    top: -100%;
    left: -100%;
}

.practice-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    border-color: var(--primary-purple);
}

.practice-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.practice-title {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.practice-category {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--primary-purple);
    border: 1px solid var(--primary-purple);
}

.practice-description {
    color: var(--text-light);
    line-height: 1.6;
    opacity: 0.9;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.95));
    margin: 3% auto;
    padding: 40px;
    border: 2px solid var(--primary-purple);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.5);
    animation: slideDown 0.4s ease;
}

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

.close-btn {
    color: var(--accent-gold);
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-purple);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    text-align: center;
}

.modal-icon {
    font-size: 4rem;
    text-align: center;
    display: block;
    margin-bottom: 20px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--border-glow);
    padding-bottom: 5px;
}

.modal-section p, .modal-section ul {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}

.modal-section ul {
    padding-left: 25px;
}

.modal-section li {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--accent-gold);
    font-style: italic;
    opacity: 0.8;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--deep-purple);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .practice-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .practices-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 25px;
        margin: 10% auto;
    }

    .modal-title {
        font-size: 2rem;
    }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}
