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

:root {
    --primary-color: #ff9a56;
    --secondary-color: #ffd4a8;
    --accent-color: #ff6b6b;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #fff8f0;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

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

.header::before {
    content: '🐾';
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    top: -30px;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.header::after {
    content: '🐾';
    position: absolute;
    font-size: 100px;
    opacity: 0.1;
    bottom: -20px;
    left: 15%;
    animation: float 8s ease-in-out infinite;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.paw {
    font-size: 48px;
    animation: pawPrint 2s ease-in-out infinite;
}

@keyframes pawPrint {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-10deg); }
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Online Users Widget */
.online-users-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.6s ease-out;
}

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

.users-icon {
    font-size: 1.5rem;
}

.users-count {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 30px;
    text-align: center;
}

.users-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Intro Section */
.intro {
    margin: 50px 0;
}

.cat-intro {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 30px;
    animation: slideIn 0.8s ease-out;
}

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

.character-image {
    flex-shrink: 0;
    animation: floatImage 4s ease-in-out infinite;
}

.intro-image {
    width: 350px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.intro-image:hover {
    transform: scale(1.05);
}

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

.cat-bio h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2rem;
}

.cat-bio p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Diary Slider Section */
.diary-slider-section {
    margin: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '🐾 🐾 🐾';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
}

.slider-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-style: italic;
}

/* Slider Container */
.slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

.slider-wrapper {
    overflow: hidden;
    border-radius: 15px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

/* Slider Cards */
.slider-card {
    flex: 0 0 calc(33.333% - 14px);
    background: var(--bg-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--primary-color);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    cursor: pointer;
    position: relative;
}

.slider-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #2d1b12;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 12px 24px -16px rgba(249, 115, 22, 0.6);
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.card-date {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 15px;
}

.card-summary {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid var(--secondary-color);
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
}

.card-hearts {
    font-weight: 600;
    color: #ff6b6b;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-btn-prev {
    left: 0;
}

.slider-btn-next {
    right: 0;
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.slider-dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Community Section (Comments + Testimonials) */
.community-section {
    margin: 80px 0;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 25px 60px -30px rgba(255, 154, 86, 0.45);
}

.community-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
}

.community-intro {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-top: 12px;
}

.community-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.panel-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title::before {
    content: '✍️';
}

.testimonial-panel {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.testimonial-slider {
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    min-height: 240px;
    background: linear-gradient(135deg, rgba(255, 238, 220, 0.9), rgba(255, 225, 205, 0.9));
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.testimonial-card {
    flex: 0 0 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.testimonial-quote {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.testimonial-meta strong {
    color: var(--accent-color);
}

.testimonial-response {
    background: rgba(255, 255, 255, 0.8);
    padding: 16px;
    border-radius: 14px;
    border-left: 4px solid var(--primary-color);
    box-shadow: inset 0 0 0 1px rgba(255, 154, 86, 0.15);
}

.testimonial-controls {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.testimonial-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
}

.testimonial-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.testimonial-nav:not(:disabled):hover {
    transform: translateY(-2px);
}

.testimonial-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex: 1;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 154, 86, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.testimonial-dot.active {
    background: var(--accent-color);
    width: 24px;
}

.comment-panel {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.comment-form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    font-weight: 600;
    color: var(--text-dark);
}

.form-field input,
.form-field textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(255, 154, 86, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    min-height: 48px;
    box-sizing: border-box;
}

.form-field textarea {
    min-height: 140px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 154, 86, 0.2);
}

.comment-submit {
    justify-self: start;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 16px 35px -20px rgba(255, 107, 107, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px -20px rgba(255, 107, 107, 0.9);
}

.comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.comment-help {
    font-size: 0.9rem;
    color: var(--text-light);
}

.comment-status {
    min-height: 22px;
    font-size: 0.95rem;
    font-weight: 500;
}

.comment-status.success {
    color: #059669;
}

.comment-status.error {
    color: #dc2626;
}

@media (max-width: 960px) {
    .community-section {
        margin: 60px 0;
        padding: 40px 24px;
    }

    .community-header {
        margin-bottom: 30px;
    }

    .community-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .testimonial-panel,
    .comment-panel {
        padding: 24px;
    }

    .panel-title {
        font-size: 1.4rem;
    }

    .testimonial-slider {
        min-height: 200px;
    }

    .testimonial-card {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .community-section {
        margin: 40px 0;
        padding: 32px 16px;
    }

    .community-header {
        margin-bottom: 24px;
    }

    .community-intro {
        font-size: 0.95rem;
    }

    .community-grid {
        gap: 20px;
    }

    .testimonial-panel,
    .comment-panel {
        padding: 20px;
        border-radius: 16px;
    }

    .panel-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }

    .testimonial-slider {
        min-height: 180px;
        border-radius: 12px;
    }

    .testimonial-card {
        padding: 20px;
        gap: 14px;
    }

    .testimonial-quote {
        font-size: 1rem;
        line-height: 1.5;
    }

    .testimonial-meta {
        font-size: 0.85rem;
    }

    .testimonial-response {
        padding: 12px;
        border-radius: 10px;
    }

    .testimonial-controls {
        margin-top: 14px;
        gap: 8px;
    }

    .testimonial-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .comment-form {
        gap: 16px;
    }

    .form-field {
        gap: 6px;
    }

    .form-field input,
    .form-field textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .form-field textarea {
        min-height: 120px;
    }

    .comment-submit {
        width: 100%;
        padding: 12px 24px;
        justify-self: stretch;
    }

    .comment-help {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .community-section {
        margin: 32px 0;
        padding: 24px 12px;
    }

    .community-header {
        margin-bottom: 20px;
    }

    .community-intro {
        font-size: 0.9rem;
        margin-top: 10px;
    }

    .community-grid {
        gap: 16px;
    }

    .testimonial-panel,
    .comment-panel {
        padding: 16px;
        border-radius: 12px;
    }

    .panel-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
        gap: 8px;
    }

    .testimonial-slider {
        min-height: 160px;
    }

    .testimonial-card {
        padding: 16px;
        gap: 12px;
    }

    .testimonial-quote {
        font-size: 0.95rem;
    }

    .testimonial-response {
        padding: 10px;
    }

    .testimonial-nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .testimonial-dot {
        width: 8px;
        height: 8px;
    }

    .testimonial-dot.active {
        width: 20px;
    }

    .comment-form {
        gap: 14px;
    }

    .form-field input,
    .form-field textarea {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .form-field textarea {
        min-height: 100px;
    }

    .comment-submit {
        padding: 11px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .community-section {
        padding: 20px 10px;
    }

    .testimonial-panel,
    .comment-panel {
        padding: 14px;
    }

    .panel-title {
        font-size: 1.1rem;
    }

    .testimonial-slider {
        min-height: 140px;
    }

    .testimonial-card {
        padding: 14px;
    }

    .form-field input,
    .form-field textarea {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.2rem;
}

.loading-message p {
    animation: pulse 2s ease-in-out infinite;
}

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

/* View All Button */
.view-all-container {
    text-align: center;
    margin: 30px 0;
}

.view-all-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Chatbot Section */
.chatbot-section {
    margin: 60px 0;
    padding: 40px 0;
    display: none; /* Hide original chatbot section */
}

.chatbot-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-style: italic;
}

.chat-container {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(to bottom, #fff8f0, #ffffff);
}

.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: messageSlide 0.4s ease-out;
}

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

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    margin-left: auto;
}

.message-avatar {
    font-size: 40px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: white;
    padding: 2px;
}

.message-content {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 15px;
    max-width: 70%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: var(--bg-light);
    border-top: 2px solid #ffe8d6;
}

.chat-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--secondary-color);
    border-radius: 25px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.send-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.footer p {
    margin: 5px 0;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Purr Toggle Button */
.purr-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    min-width: 70px;
    height: 70px;
    border-radius: 35px;
    background: linear-gradient(135deg, rgba(255, 239, 220, 0.95) 0%, rgba(255, 218, 168, 0.95) 100%);
    border: 2px solid rgba(217, 119, 6, 0.3);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.3);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    transition: all 0.3s ease;
    animation: floatPurr 4s ease-in-out infinite;
    backdrop-filter: blur(10px);
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    font-weight: 600;
    color: #8b7355;
    /* Prevent text selection on mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Ensure button doesn't interfere with scrolling */
    pointer-events: auto;
}

.purr-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(217, 119, 6, 0.4);
    border-color: rgba(217, 119, 6, 0.5);
}

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

.purr-toggle-btn.active {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(255, 218, 168, 0.25) 100%);
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.35);
}

.purr-icon {
    font-size: 1.8rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.purr-toggle-btn:hover .purr-icon {
    transform: scale(1.1);
}

.purr-toggle-btn.active .purr-icon {
    animation: purrPulse 2s ease-in-out infinite;
}

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

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

.purr-label {
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .purr-toggle-btn {
        bottom: 90px;
        left: 12px;
        min-width: 56px;
        height: 56px;
        padding: 0 10px;
        font-size: 0.8rem;
        border-radius: 28px;
        /* Safe area for mobile devices */
        bottom: max(90px, env(safe-area-inset-bottom, 90px));
        left: max(12px, env(safe-area-inset-left, 12px));
    }

    .purr-icon {
        font-size: 1.4rem;
    }

    .purr-label {
        font-size: 0.75rem;
        display: none; /* Hide label on tablet to save space */
    }
}

@media (max-width: 480px) {
    .purr-toggle-btn {
        bottom: 80px;
        left: 10px;
        min-width: 50px;
        height: 50px;
        padding: 0 8px;
        border-radius: 25px;
        font-size: 0.75rem;
        /* Safe area for mobile devices */
        bottom: max(80px, calc(env(safe-area-inset-bottom, 0px) + 80px));
        left: max(10px, env(safe-area-inset-left, 10px));
    }

    .purr-icon {
        font-size: 1.3rem;
    }

    .purr-label {
        display: none; /* Hide label on mobile */
    }
}

@media (max-width: 360px) {
    .purr-toggle-btn {
        bottom: 75px;
        left: 8px;
        min-width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 24px;
    }

    .purr-icon {
        font-size: 1.2rem;
    }
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    border: none;
    box-shadow: 0 8px 25px rgba(255, 154, 86, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

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

.chat-btn-icon {
    width: 50px;
    height: 50px;
    animation: catSleep 2s ease-in-out infinite;
}

@keyframes catSleep {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(-2deg);
    }
    75% {
        transform: translateY(-3px) rotate(2deg);
    }
}

.chat-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    animation: pulse-badge 2s ease-in-out infinite;
}

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

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: clamp(80px, 16vh, 140px);
    right: clamp(16px, 4vw, 36px);
    width: clamp(320px, 28vw, 420px);
    max-height: clamp(380px, 70vh, 640px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

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

.chat-window.hidden {
    display: none;
}

.chat-window-header {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-header-info h3 {
    color: white;
    font-size: 1.1rem;
    margin: 0 0 3px 0;
}

.chat-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin: 0;
}

.close-chat-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

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

.chat-window-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(to bottom, #fff8f0, #ffffff);
}

.chat-window-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--bg-light);
    border-top: 2px solid #ffe8d6;
}

.chat-window-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-window-input:focus {
    border-color: var(--primary-color);
}

.send-window-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.send-window-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.send-window-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .slider-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        justify-content: center;
    }
    
    .online-users-widget {
        margin: 0 auto;
    }
    
    .cat-intro {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .intro-image {
        width: 280px;
    }
    
    .slider-container {
        padding: 0 50px;
    }
    
    .slider-card {
        flex: 0 0 100%;
        min-height: 280px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-summary {
        font-size: 0.95rem;
    }
    
    .chat-messages {
        height: 400px;
        padding: 20px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .send-button {
        padding: 15px 20px;
    }
    
    .floating-chat-btn {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        /* Safe area for mobile devices */
        bottom: max(20px, env(safe-area-inset-bottom, 20px));
        right: max(20px, env(safe-area-inset-right, 20px));
    }

    .purr-toggle-btn {
        bottom: 90px;
        left: 12px;
        min-width: 56px;
        height: 56px;
        /* Safe area for mobile devices */
        bottom: max(90px, calc(env(safe-area-inset-bottom, 0px) + 90px));
        left: max(12px, env(safe-area-inset-left, 12px));
    }
    
    .chat-btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .chat-window {
        width: calc(100vw - 48px);
        max-width: 520px;
        left: 24px;
        right: 24px;
        bottom: clamp(140px, 18vh, 160px);
        max-height: calc(100vh - 180px);
    }

    .chat-window-messages {
        padding: 18px;
    }

    .chat-window-input-container {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .slider-container {
        padding: 0 45px;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    .send-button {
        width: 100%;
    }
    
    .intro-image {
        width: 220px;
    }
    
    .chat-window {
        width: calc(100vw - 24px);
        left: 12px;
        right: 12px;
        bottom: clamp(130px, 16vh, 150px);
        max-height: calc(100vh - 160px);
    }

    .chat-window-input-container {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px 18px;
    }

    .send-window-button {
        width: 100%;
    }

    .chat-window-messages {
        padding: 16px;
    }

    .floating-chat-btn {
        bottom: 18px;
        right: 18px;
        width: 58px;
        height: 58px;
        /* Safe area for mobile devices */
        bottom: max(18px, env(safe-area-inset-bottom, 18px));
        right: max(18px, env(safe-area-inset-right, 18px));
    }

    .purr-toggle-btn {
        bottom: 82px;
        left: 10px;
        min-width: 50px;
        height: 50px;
        /* Safe area for mobile devices */
        bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 82px));
        left: max(10px, env(safe-area-inset-left, 10px));
    }

    .chat-btn-icon {
        width: 36px;
        height: 36px;
    }
    
    .online-users-widget {
        padding: 8px 15px;
    }
    
    .users-count {
        font-size: 1.5rem;
    }
    
    .users-label {
        font-size: 0.8rem;
    }
}

/* Ash Cursor Follower */
.ash-cursor-follower {
    position: fixed;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
    opacity: 0;
    will-change: transform, left, top;
}

.ash-cursor-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: ashChase 1s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes ashChase {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Optional: Add a trail effect */
.ash-cursor-follower::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 154, 86, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ashGlow 2s ease-in-out infinite;
}

@keyframes ashGlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@media (max-width: 768px) {
    .ash-cursor-follower {
        display: none !important;
    }
}
