@keyframes bobbing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Leaf Shower Animation */
@keyframes leafFall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes leafFallLeft {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-100px) rotate(-360deg);
        opacity: 0;
    }
}

.leaf-shower {
    position: fixed;
    top: -10vh;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.falling-leaf {
    position: absolute;
    font-size: 40px;
    opacity: 0.8;
}

.falling-leaf:nth-child(1) {
    left: 10%;
    animation: leafFall 3s ease-in forwards;
    animation-delay: 0s;
}

.falling-leaf:nth-child(2) {
    left: 20%;
    animation: leafFallLeft 3.5s ease-in forwards;
    animation-delay: 0.3s;
}

.falling-leaf:nth-child(3) {
    left: 30%;
    animation: leafFall 4s ease-in forwards;
    animation-delay: 0.6s;
}

.falling-leaf:nth-child(4) {
    left: 40%;
    animation: leafFallLeft 3.2s ease-in forwards;
    animation-delay: 0.9s;
}

.falling-leaf:nth-child(5) {
    left: 50%;
    animation: leafFall 3.8s ease-in forwards;
    animation-delay: 1.2s;
}

.falling-leaf:nth-child(6) {
    left: 60%;
    animation: leafFallLeft 3.3s ease-in forwards;
    animation-delay: 0.4s;
}

.falling-leaf:nth-child(7) {
    left: 70%;
    animation: leafFall 3.9s ease-in forwards;
    animation-delay: 0.8s;
}

.falling-leaf:nth-child(8) {
    left: 80%;
    animation: leafFallLeft 3.6s ease-in forwards;
    animation-delay: 1.1s;
}

.falling-leaf:nth-child(9) {
    left: 90%;
    animation: leafFall 3.4s ease-in forwards;
    animation-delay: 0.5s;
}

.falling-leaf:nth-child(10) {
    left: 15%;
    animation: leafFallLeft 3.7s ease-in forwards;
    animation-delay: 1.3s;
}* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #1a5f3f;
    --primary-dark: #0d3a26;
    --accent-gold: #d4a574;
    --accent-red: #e74c3c;
    --text-light: #f0f0f0;
    --text-muted: #b0b0b0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d3a26 0%, #1a5f3f 50%, #0d3a26 100%);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 95, 63, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a574, #90c89f);
    border-radius: 10px;
    border: 2px solid rgba(26, 95, 63, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e8b88a, #a8d9b0);
    box-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
}

/* Firefox Scrollbar */
* {
    scrollbar-color: linear-gradient(180deg, #d4a574, #90c89f) rgba(26, 95, 63, 0.3);
    scrollbar-width: thin;
}

/* Forest Background */
.forest-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(26, 95, 63, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(13, 58, 38, 0.3) 0%, transparent 50%);
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: slideInUp 0.6s ease-out;
}

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

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

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

.container {
    position: relative;
    z-index: 11;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 30px 20px;
    flex: 1;
    overflow-y: auto;
}

/* Loading Screen */
#loading-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0d3a26 0%, #1a5f3f 50%, #0d3a26 100%);
    z-index: 999;
}

#loading-screen.active {
    display: flex;
    z-index: 999;
}

/* Character Select Screen */
#character-select-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0d3a26 0%, #1a5f3f 50%, #0d3a26 100%);
    z-index: 100;
}

#character-select-screen.active {
    display: flex;
    z-index: 100;
}

.loading-container {
    text-align: center;
}

.forest-loader {
    font-size: 60px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.leaf {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.leaf-1 {
    animation-delay: 0s;
}

.leaf-2 {
    animation-delay: 0.5s;
}

.leaf-3 {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(15deg);
    }
}

.loading-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #d4a574, #1a5f3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

.loading-subtitle {
    font-size: 18px;
    color: #90c89f;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Login Screen */
#login-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0d3a26 0%, #1a5f3f 50%, #0d3a26 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 50px;
    animation: slideInDown 0.8s ease-out;
}

.main-title {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #d4a574, #90c89f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.tagline {
    font-size: 24px;
    color: #90c89f;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 16px;
    color: #b0b0b0;
    font-style: italic;
}

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

.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    animation: slideInUp 1s ease-out;
}

.animal-card {
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.8), rgba(13, 58, 38, 0.8));
    border: 2px solid #90c89f;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.animal-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent,
        rgba(212, 165, 116, 0.2),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

.animal-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #d4a574;
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.3);
}

.animal-avatar {
    font-size: 80px;
    margin-bottom: 15px;
    display: inline-block;
    animation: bobbing 2s ease-in-out infinite;
}

@keyframes bobbing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.animal-card h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #d4a574;
}

.animal-card p {
    font-size: 14px;
    color: #90c89f;
}

.glow-effect {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a574, transparent);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.animal-card:hover .glow-effect {
    width: 80%;
}

/* Individual Animal Card Colors */
.animal-card[data-animal-id="1"] {
    background: linear-gradient(135deg, rgba(59, 89, 152, 0.9), rgba(41, 62, 107, 0.9)) !important;
    border-color: #4a7bc4 !important;
}

.animal-card[data-animal-id="1"]:hover {
    border-color: #6b9ff5 !important;
    box-shadow: 0 20px 40px rgba(74, 123, 196, 0.3) !important;
}

.animal-card[data-animal-id="2"] {
    background: linear-gradient(135deg, rgba(217, 83, 79, 0.9), rgba(169, 54, 50, 0.9)) !important;
    border-color: #e67e7e !important;
}

.animal-card[data-animal-id="2"]:hover {
    border-color: #ff9999 !important;
    box-shadow: 0 20px 40px rgba(217, 83, 79, 0.3) !important;
}

.animal-card[data-animal-id="3"] {
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.9), rgba(108, 52, 131, 0.9)) !important;
    border-color: #b19cd9 !important;
}

.animal-card[data-animal-id="3"]:hover {
    border-color: #d7b5e8 !important;
    box-shadow: 0 20px 40px rgba(142, 68, 173, 0.3) !important;
}

.animal-card[data-animal-id="4"] {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.9), rgba(184, 134, 11, 0.9)) !important;
    border-color: #f5d76e !important;
}

.animal-card[data-animal-id="4"]:hover {
    border-color: #fde896 !important;
    box-shadow: 0 20px 40px rgba(241, 196, 15, 0.3) !important;
}

.animal-card[data-animal-id="5"] {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9), rgba(27, 94, 32, 0.9)) !important;
    border-color: #81c784 !important;
}

.animal-card[data-animal-id="5"]:hover {
    border-color: #a5d6a7 !important;
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.3) !important;
}

.animal-card[data-animal-id="6"] {
    background: linear-gradient(135deg, rgba(120, 81, 45, 0.9), rgba(78, 52, 30, 0.9)) !important;
    border-color: #a1887f !important;
}

.animal-card[data-animal-id="6"]:hover {
    border-color: #d7ccc8 !important;
    box-shadow: 0 20px 40px rgba(120, 81, 45, 0.3) !important;
}

.forest-quote {
    text-align: center;
    font-size: 16px;
    color: #90c89f;
    font-style: italic;
    animation: fadeIn 1.5s ease-out;
}

.forest-quote p {
    background: rgba(26, 95, 63, 0.5);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #d4a574;
    backdrop-filter: blur(10px);
}

/* Home Screen */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    animation: slideInDown 0.6s ease-out;
}

.user-greeting {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #d4a574, #90c89f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(231, 76, 60, 0.8);
    border: 2px solid #e74c3c;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.logout-btn:hover {
    background: #e74c3c;
    transform: scale(1.05);
}

.home-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.9), rgba(13, 58, 38, 0.9));
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 40px;
    border: 2px solid #90c89f;
    animation: slideInUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.profile-avatar {
    font-size: 80px;
    display: inline-block;
    animation: swing 3s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.profile-info h3 {
    font-size: 24px;
    color: #d4a574;
    margin-bottom: 5px;
}

.profile-info p {
    color: #90c89f;
    font-size: 14px;
}

.progress-section {
    margin-bottom: 40px;
    animation: slideInUp 0.8s ease-out;
}

.progress-section h4 {
    margin-bottom: 10px;
    color: #90c89f;
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(13, 58, 38, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #90c89f;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #90c89f, #d4a574);
    border-radius: 10px;
    width: 0%;
    transition: width 0.6s ease;
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
}

.progress-text {
    font-size: 13px;
    color: #b0b0b0;
}

.home-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.menu-btn {
    padding: 30px;
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.9), rgba(13, 58, 38, 0.9));
    border: 2px solid #90c89f;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.3), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    transform: translateY(-10px);
    border-color: #d4a574;
    box-shadow: 0 15px 40px rgba(212, 165, 116, 0.3);
}

.btn-icon {
    font-size: 50px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.ritual-btn .btn-icon {
    animation-delay: 0s;
}

.matches-btn .btn-icon {
    animation-delay: 0.3s;
}

.leaderboard-btn .btn-icon {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.btn-text {
    font-size: 18px;
    font-weight: bold;
    color: #d4a574;
}

.btn-subtitle {
    font-size: 12px;
    color: #90c89f;
}

.mystical-message {
    text-align: center;
    padding: 20px;
    background: rgba(26, 95, 63, 0.6);
    border-radius: 10px;
    border-left: 4px solid #d4a574;
    animation: fadeIn 1.5s ease-out;
    backdrop-filter: blur(10px);
}

.mystical-message p {
    color: #90c89f;
    font-style: italic;
    font-size: 14px;
}

/* Ritual Screen */
.ritual-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ritual-header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideInDown 0.6s ease-out;
}

.ritual-header h2 {
    font-size: 42px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #d4a574, #90c89f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ritual-header .ritual-description {
    color: #90c89f;
    font-size: 16px;
}

.ritual-card {
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.95), rgba(13, 58, 38, 0.95));
    padding: 50px 30px;
    border-radius: 20px;
    border: 2px solid #90c89f;
    text-align: center;
    margin-bottom: 40px;
    animation: slideInUp 0.8s ease-out;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ritual-icon {
    font-size: 120px;
    margin-bottom: 20px;
    display: inline-block;
    animation: ritualPulse 2s ease-in-out infinite;
}

@keyframes ritualPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.ritual-card h3 {
    font-size: 32px;
    color: #d4a574;
    margin-bottom: 15px;
}

.ritual-card p {
    font-size: 18px;
    color: #90c89f;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    animation: slideInUp 1s ease-out;
}

.choice-btn {
    padding: 18px 25px;
    background: linear-gradient(135deg, rgba(144, 200, 159, 0.2), rgba(212, 165, 116, 0.2));
    border: 2px solid #90c89f;
    color: #f0f0f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 165, 116, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.choice-btn:hover::before {
    width: 300px;
    height: 300px;
}

.choice-btn:hover {
    border-color: #d4a574;
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.choice-btn:active {
    transform: scale(0.98);
}

.forest-message {
    text-align: center;
    padding: 20px;
    background: rgba(26, 95, 63, 0.6);
    border-radius: 10px;
    border-left: 4px solid #d4a574;
    animation: fadeIn 1.5s ease-out;
    backdrop-filter: blur(10px);
}

.forest-message p {
    color: #90c89f;
    font-style: italic;
}

/* Matches Screen */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #d4a574, #90c89f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 0.6s ease-out;
}

.matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    animation: slideInUp 0.8s ease-out;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: rgba(26, 95, 63, 0.6);
    border-radius: 15px;
    color: #90c89f;
    font-size: 18px;
    backdrop-filter: blur(10px);
}

.match-card {
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.95), rgba(13, 58, 38, 0.95));
    border: 2px solid #90c89f;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.match-card:hover {
    transform: translateY(-15px) scale(1.05);
    border-color: #d4a574;
    box-shadow: 0 30px 60px rgba(212, 165, 116, 0.4);
}

.match-avatar {
    font-size: 100px;
    margin-bottom: 20px;
    display: inline-block;
    animation: floatMatch 3s ease-in-out infinite;
}

@keyframes floatMatch {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.match-card h3 {
    font-size: 24px;
    color: #d4a574;
    margin-bottom: 5px;
}

.match-card p {
    color: #90c89f;
    margin-bottom: 15px;
}

.match-hidden {
    opacity: 0.5;
}

.match-hidden h3,
.match-hidden p {
    color: #707070;
}

.elder-comment {
    background: rgba(212, 165, 116, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 3px solid #d4a574;
    color: #90c89f;
    font-size: 14px;
    font-style: italic;
}

.reveal-btn,
.connect-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #d4a574, #90c89f);
    border: none;
    color: #0d3a26;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.connect-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.reveal-btn:hover,
.connect-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Chat Screen */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.95), rgba(13, 58, 38, 0.95));
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #90c89f;
    animation: slideInDown 0.6s ease-out;
    backdrop-filter: blur(10px);
}

.chat-avatar {
    font-size: 60px;
    display: inline-block;
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.chat-info h3 {
    color: #d4a574;
    font-size: 20px;
    margin-bottom: 3px;
}

.chat-info p {
    color: #90c89f;
    font-size: 12px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    animation: messageSlide 0.5s ease-out;
}

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

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 15px;
    word-wrap: break-word;
    animation: messagePop 0.4s ease-out;
}

@keyframes messagePop {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}

.message.user .message-content {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.match .message-content {
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.9), rgba(13, 58, 38, 0.9));
    color: #90c89f;
    border-bottom-left-radius: 5px;
    border: 1px solid #90c89f;
}

.message.system .message-content {
    background: rgba(26, 95, 63, 0.6);
    color: #d4a574;
    border-radius: 15px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin: 10px auto;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    animation: slideInUp 0.6s ease-out;
}

.message-input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(26, 95, 63, 0.8);
    border: 2px solid #90c89f;
    border-radius: 10px;
    color: #f0f0f0;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.message-input:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
}

.message-input::placeholder {
    color: #b0b0b0;
}

.send-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Elders Screen */
.elders-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    animation: slideInUp 0.8s ease-out;
}

.elder-card {
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.95), rgba(13, 58, 38, 0.95));
    border: 2px solid #d4a574;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.elder-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 165, 116, 0.3);
    border-color: #90c89f;
}

.elder-emoji {
    font-size: 80px;
    margin-bottom: 15px;
    display: inline-block;
    animation: rotateY 3s ease-in-out infinite;
}

@keyframes rotateY {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(20deg);
    }
}

.elder-card h3 {
    color: #d4a574;
    font-size: 20px;
    margin-bottom: 10px;
}

.elder-card p {
    color: #90c89f;
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
}

/* Back Button */
.back-btn:hover {
    transform: translateX(-5px);
    border-color: #d4a574;
    box-shadow: 0 10px 25px rgba(212, 165, 116, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .main-title {
        font-size: 36px;
    }

    .animals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ritual-card {
        padding: 30px 20px;
    }

    .ritual-icon {
        font-size: 80px;
    }

    .choice-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .home-menu {
        grid-template-columns: 1fr;
    }

    .menu-btn {
        padding: 20px;
    }

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

    .btn-text {
        font-size: 16px;
    }

    .message-content {
        max-width: 85%;
    }
} 

.back-btn{
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    padding: 10px 20px;
    background: rgba(26, 95, 63, 0.8);
    border: 2px solid #90c89f;
    color: #90c89f;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

