/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
}


/* 3D Scene Container */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* 3D Floor */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(45deg, 
        rgba(20,20,40,0.8) 0%, 
        rgba(30,30,50,0.6) 50%, 
        rgba(20,20,40,0.8) 100%);
    transform: rotateX(85deg) translateZ(-150px);
    transform-origin: bottom center;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
}

/* 3D Side Walls */
body {
    --wall-color: linear-gradient(135deg, rgba(30,30,60,0.9) 0%, rgba(40,40,80,0.7) 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100%;
    background: var(--wall-color);
    transform: rotateY(90deg) translateZ(-100px);
    transform-origin: right center;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 10px 0 50px rgba(0,0,0,0.3);
}

/* 3D Ceiling */
body > .ceiling {
    content: '';
    position: fixed;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, rgba(40,40,80,0.9) 0%, rgba(50,50,100,0.7) 100%);
    transform: rotateX(90deg) translateZ(-50px);
    transform-origin: top center;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.2);
}

/* 3D Room Container */
.room-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 2000px;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 0;
}

/* 3D Lighting Effects */
.light-source {
    position: fixed;
    top: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 2;
    animation: lightPulse 4s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 3D Environment Elements */
.environment-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transform-style: preserve-3d;
}

.floating-cube {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    animation: floatCube 20s infinite linear;
}

.floating-cube::before,
.floating-cube::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.floating-cube::before {
    transform: translateZ(30px);
}

.floating-cube::after {
    transform: rotateY(90deg) translateZ(30px);
}

.floating-sphere {
    position: absolute;
    top: 60%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, rgba(102, 126, 234, 0.2) 100%);
    border-radius: 50%;
    animation: floatSphere 15s infinite ease-in-out;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.floating-pyramid {
    position: absolute;
    bottom: 30%;
    left: 20%;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 80px solid rgba(118, 75, 162, 0.3);
    transform-style: preserve-3d;
    animation: floatPyramid 25s infinite linear;
}

@keyframes floatCube {
    0% { transform: rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0); }
    100% { transform: rotateX(360deg) rotateY(360deg) translate3d(100px, -50px, 200px); }
}

@keyframes floatSphere {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    25% { transform: translate3d(50px, -30px, 100px) scale(1.1); }
    50% { transform: translate3d(-30px, 50px, 50px) scale(0.9); }
    75% { transform: translate3d(-50px, -20px, 150px) scale(1.05); }
}

@keyframes floatPyramid {
    0% { transform: rotateY(0deg) rotateX(0deg) translate3d(0, 0, 0); }
    100% { transform: rotateY(360deg) rotateX(180deg) translate3d(-80px, 40px, 100px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Better spacing for sections */
section {
    padding: 80px 0;
    margin-bottom: 0;
}

/* Improved spacing for mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    section {
        padding: 60px 0;
    }
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 50%, #764ba2 100%);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
}

/* Theme Selector 3D */
.theme-selector {
    position: relative;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    transform: rotateY(0deg);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotateY(180deg);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) rotateX(-15deg);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    z-index: 1000;
}

.theme-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px) rotateX(0deg);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
    transform-style: preserve-3d;
    transform: translateZ(0deg);
}

.theme-option:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateZ(10px);
    color: #667eea;
}

.theme-option:first-child {
    border-radius: 15px 15px 0 0;
}

.theme-option:last-child {
    border-radius: 0 0 15px 15px;
}

.btn-donate {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-donate:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 100px 0;
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 50%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 3D Floating Elements */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float3d 20s infinite ease-in-out;
}

.hero::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.hero::after {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

@keyframes float3d {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: translate3d(50px, -30px, 100px) rotateY(90deg) rotateX(15deg);
    }
    50% {
        transform: translate3d(-30px, 50px, 50px) rotateY(180deg) rotateX(-15deg);
    }
    75% {
        transform: translate3d(-50px, -20px, 150px) rotateY(270deg) rotateX(10deg);
    }
}

.hero-content {
    flex: 1;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 15px 30px;
    border: 2px solid white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
}

.hero-image i {
    font-size: 15rem;
    opacity: 0.3;
    transform: rotateY(0deg) rotateX(0deg);
    animation: rotate3d 10s infinite linear;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg) rotateZ(0deg);
    }
}

/* 3D Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translate3d(0, 100vh, 0) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate3d(100px, -100vh, 200px) rotateY(720deg);
        opacity: 0;
    }
}

/* Filters Section */
.filters {
    padding: 60px 0;
    background: white;
    border-radius: 30px 30px 0 0;
    margin-top: -1px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

.filters h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

.filter-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-options select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-filter {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Animals Section */
.animals {
    padding: 80px 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.animals h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2rem;
}

.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
    padding: 20px 0;
}

.animal-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.animal-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.animal-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.animal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.animal-card:hover .animal-image img {
    transform: scale(1.08);
}

.animal-info {
    padding: 25px;
}

.animal-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

.animal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.animal-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.animal-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.animal-description {
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.animal-actions {
    display: flex;
    gap: 12px;
}

.btn-adopt, .btn-details {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}

.btn-adopt {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-adopt:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-details {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-details:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animals-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 15px 0;
    }
    
    .animal-info {
        padding: 20px;
    }
    
    .animal-name {
        font-size: 1.2rem;
    }
    
    .animal-actions {
        flex-direction: column;
    }
    
    .btn-adopt, .btn-details {
        width: 100%;
    }
}

.animal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 15px;
}

.animal-card:hover {
    transform: translateY(-15px) scale(1.05) rotateY(8deg) rotateX(-8deg) translateZ(20px);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.3),
        0 15px 35px rgba(0,0,0,0.2),
        0 0 30px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.animal-card:hover .animal-image img {
    transform: scale(1.1) rotateY(10deg);
    filter: brightness(1.1);
}

.animal-card:hover .animal-name {
    color: #667eea;
    transform: translateX(5px) translateZ(20px);
}

.animal-card:hover .animal-tag {
    transform: translateY(-2px) translateZ(10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.animal-card:hover .btn-adopt {
    background: #45a049;
    transform: translateY(-2px) translateZ(15px);
}

.animal-card:hover .btn-details {
    background: #1976d2;
    transform: translateY(-2px) translateZ(15px);
}

.animal-card:hover::before {
    opacity: 1;
}

.animal-card:hover .animal-image img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.animal-card:hover .animal-name {
    color: #667eea;
    transform: translateX(5px);
}

.animal-card:hover .animal-tag {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.animal-card:hover .btn-adopt {
    background: #45a049;
    transform: translateY(-2px);
}

.animal-card:hover .btn-details {
    background: #1976d2;
    transform: translateY(-2px);
}

.animal-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.animal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.animal-card:hover .animal-image::after {
    opacity: 1;
}

.animal-info {
    padding: 20px;
}

.animal-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    transition: all 0.3s ease;
}

.animal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.animal-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.animal-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.animal-card:hover .animal-tag::before {
    left: 100%;
}

.animal-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.animal-actions {
    display: flex;
    gap: 10px;
}

.btn-adopt {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    position: relative;
    overflow: hidden;
}

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

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

.btn-adopt:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

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

.btn-details {
    background: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    position: relative;
    overflow: hidden;
}

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

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

.btn-details:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

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

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
    font-size: 0.9rem;
}

.about-image {
    text-align: center;
}

.about-image i {
    font-size: 10rem;
    color: #667eea;
    opacity: 0.3;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
    color: #333;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item i {
    font-size: 2rem;
    color: #667eea;
    width: 50px;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.contact-item p {
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

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

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

.modal.closing .modal-content {
    animation: modalSlideOut 0.3s ease forwards;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Image Upload Styles */
.image-upload-container {
    position: relative;
    width: 100%;
}

.image-upload-container input[type="file"] {
    display: none;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.image-preview:hover {
    border-color: #5a67d8;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.preview-placeholder {
    text-align: center;
    color: #667eea;
    transition: all 0.3s ease;
    padding: 20px;
}

.preview-placeholder i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
    animation: pulse 2s infinite;
}

.preview-placeholder p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.image-preview:hover .preview-placeholder {
    color: #5a67d8;
}

.image-preview:hover .preview-placeholder i {
    animation: none;
    transform: scale(1.1);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 10px;
}

.image-preview .remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e53e3e;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.image-preview:hover .remove-image {
    opacity: 1;
}

.remove-image:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.1);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    background: white;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.form-group label {
    position: relative;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #667eea;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-image {
        margin-top: 30px;
    }

    .hero-image i {
        font-size: 8rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .filter-options {
        flex-direction: column;
        align-items: center;
    }

    .filter-options select,
    .btn-filter {
        width: 100%;
        max-width: 300px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about h2 {
        font-size: 2rem;
    }

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .animal-actions {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Hero Section Enhanced Animations */
.hero-content h1 {
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.9s both;
}

/* Section Headers */
section h2 {
    animation: fadeInUp 0.8s ease-out;
}

/* Feature Cards */
.feature {
    animation: fadeInUp 0.8s ease-out;
}

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }

/* Contact Items */
.contact-item {
    animation: fadeInLeft 0.8s ease-out;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced Button States */
.btn-primary:active,
.btn-secondary:active,
.btn-adopt:active,
.btn-details:active,
.btn-filter:active,
.btn-donate:active {
    transform: translateY(-1px);
}

/* Loading Skeleton Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 3D Themes */
.theme-classic {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --card-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.theme-neon {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #ffff00;
    --card-shadow: 0 0 30px rgba(0,255,255,0.5);
}

.theme-neon .animal-card {
    border: 2px solid var(--primary-color);
    box-shadow: var(--card-shadow);
}

.theme-neon .animal-card:hover {
    box-shadow: 0 0 50px rgba(0,255,255,0.8);
}

.theme-neon .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 20px rgba(0,255,255,0.5);
}

.theme-glass {
    --primary-color: rgba(255,255,255,0.2);
    --secondary-color: rgba(255,255,255,0.1);
    --accent-color: rgba(255,255,255,0.3);
    --card-shadow: 0 8px 32px rgba(31,38,135,0.37);
}

.theme-glass .animal-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: var(--card-shadow);
}

.theme-glass .animal-card:hover {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 8px 40px rgba(31,38,135,0.5);
}

.theme-cyber {
    --primary-color: #00ff41;
    --secondary-color: #ff0040;
    --accent-color: #0040ff;
    --card-shadow: 0 0 20px rgba(0,255,65,0.3);
}

.theme-cyber .animal-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid var(--primary-color);
    box-shadow: var(--card-shadow);
}

.theme-cyber .animal-card:hover {
    box-shadow: 0 0 40px rgba(0,255,65,0.6);
    border-color: var(--accent-color);
}

.theme-cyber .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(0,255,65,0.4);
}

/* Enhanced 3D Effects for Themes */
.theme-neon .hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.theme-neon .hero::before,
.theme-neon .hero::after {
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    box-shadow: 0 0 50px var(--primary-color);
}

.theme-glass .hero {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(20px);
}

.theme-cyber .hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%);
}

.theme-cyber .hero::before,
.theme-cyber .hero::after {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 30px var(--primary-color);
}

/* 3D Particle Effects for Themes */
.theme-neon .particle {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.theme-glass .particle {
    background: rgba(255,255,255,0.6);
    box-shadow: 0 0 5px rgba(255,255,255,0.3);
}

.theme-cyber .particle {
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

/* Success Message */
.success-message {
    background: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

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

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

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Error Message */
.error-message {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

/* Enhanced Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation Classes */
.animate-fadeInUp {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInLeft {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
}

.animate-scaleIn {
    opacity: 0;
    animation: scaleIn 0.5s ease forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Staggered Animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Loading Animation Enhanced */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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