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

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 25%, #68bb59 50%, #2d5016 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 100px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(139, 195, 74, 0.15) 100%);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    margin: 20px 0 60px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 
                0 10px 20px rgba(76, 175, 80, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: perspective(1000px) rotateX(2deg);
    transition: all 0.6s ease;
}

.hero-section:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.3), 
                0 15px 30px rgba(76, 175, 80, 0.2);
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(139, 195, 74, 0.8) 0%, rgba(76, 175, 80, 0.4) 100%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(139, 195, 74, 0.6);
}

.floating-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-particles::after {
    top: 60%;
    right: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        opacity: 0.6; 
        box-shadow: 0 0 15px rgba(139, 195, 74, 0.6);
    }
    50% { 
        transform: translateY(-30px) rotate(180deg) scale(1.2); 
        opacity: 1; 
        box-shadow: 0 0 25px rgba(139, 195, 74, 0.9);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideDown 1s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    animation: slideUp 1s ease-out 0.3s both;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.leaf {
    position: absolute;
    font-size: 2rem;
    animation: leafFloat 8s ease-in-out infinite;
}

.leaf-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.leaf-2 {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.leaf-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(5deg); }
    66% { transform: translateY(-10px) rotate(-5deg); }
}

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

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

/* Pets Gallery */
.pets-gallery {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 50px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 20px 0;
    perspective: 1200px;
}

.pet-card {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.25) 0%, rgba(139, 195, 74, 0.15) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid rgba(139, 195, 74, 0.3);
    position: relative;
    overflow: hidden;
    transform: perspective(800px) rotateX(5deg) rotateY(2deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                0 5px 15px rgba(76, 175, 80, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 195, 74, 0.4), transparent);
    transition: left 0.6s ease;
}

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

.pet-card:hover {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) translateY(-20px) scale(1.08);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.3),
                0 15px 30px rgba(76, 175, 80, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(139, 195, 74, 0.6);
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.35) 0%, rgba(139, 195, 74, 0.25) 100%);
}

.pet-image {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 25px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(139, 195, 74, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.1);
    transform: perspective(400px) rotateX(10deg);
}

.pet-card:hover .pet-image {
    transform: perspective(400px) rotateX(0deg) scale(1.15) rotateZ(8deg);
    border-color: rgba(139, 195, 74, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(139, 195, 74, 0.4),
                inset 0 3px 0 rgba(255, 255, 255, 0.2);
}

.pet-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.pet-rarity {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.select-btn {
    background: linear-gradient(45deg, #4CAF50 0%, #8BC34A 50%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: perspective(200px) rotateX(5deg);
}

.select-btn:hover {
    transform: perspective(200px) rotateX(0deg) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.5),
                0 0 25px rgba(139, 195, 74, 0.4);
    background: linear-gradient(45deg, #66BB6A 0%, #AED581 50%, #66BB6A 100%);
}

/* Adoption Form */
.adoption-form {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.2) 0%, rgba(139, 195, 74, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 60px;
    margin-bottom: 50px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    animation: fadeInUp 0.8s ease-out;
    transform: perspective(1000px) rotateX(3deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2),
                0 10px 20px rgba(76, 175, 80, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.adoption-form:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25),
                0 15px 30px rgba(76, 175, 80, 0.15);
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.selected-pet-preview {
    margin-bottom: 40px;
}

.selected-pet-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(139, 195, 74, 0.5);
    margin-bottom: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2),
                0 0 25px rgba(139, 195, 74, 0.3);
    transform: perspective(300px) rotateX(8deg);
    transition: all 0.4s ease;
}

.selected-pet-preview:hover img {
    transform: perspective(300px) rotateX(0deg) scale(1.1);
}

.selected-pet-preview h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 30px;
    text-align: left;
}

.input-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 18px 25px;
    border: 2px solid rgba(139, 195, 74, 0.4);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.1) 0%, rgba(139, 195, 74, 0.05) 100%);
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: perspective(400px) rotateX(2deg);
}

.input-group input::placeholder {
    color: rgba(255,255,255,0.6);
}

.input-group input:focus {
    outline: none;
    border-color: rgba(139, 195, 74, 0.8);
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.15) 0%, rgba(139, 195, 74, 0.1) 100%);
    transform: perspective(400px) rotateX(0deg) translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15),
                0 0 25px rgba(139, 195, 74, 0.3);
}

.submit-btn {
    background: linear-gradient(45deg, #4CAF50 0%, #8BC34A 25%, #66BB6A 50%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 18px 45px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transform: perspective(300px) rotateX(5deg);
    box-shadow: 0 12px 25px rgba(76, 175, 80, 0.4),
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.submit-btn:hover {
    transform: perspective(300px) rotateX(0deg) translateY(-6px) scale(1.05);
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.6),
                0 0 30px rgba(139, 195, 74, 0.5);
    background: linear-gradient(45deg, #66BB6A 0%, #AED581 25%, #81C784 50%, #66BB6A 100%);
}

.btn-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.3s ease;
}

.submit-btn:hover .btn-sparkle {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.success-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(139, 195, 74, 0.2) 100%);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 60px;
    text-align: center;
    border: 2px solid rgba(139, 195, 74, 0.4);
    transform: perspective(800px) rotateX(15deg) scale(0.8) translateY(50px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3),
                0 10px 25px rgba(76, 175, 80, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.success-modal.show .modal-content {
    transform: perspective(800px) rotateX(0deg) scale(1) translateY(0);
}

.success-animation {
    position: relative;
    margin-bottom: 30px;
}

.checkmark {
    font-size: 5rem;
    color: #4CAF50;
    animation: checkmarkPop 0.8s ease-out 0.3s both;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    transform: perspective(200px) rotateX(10deg);
}

@keyframes checkmarkPop {
    0% { transform: perspective(200px) rotateX(10deg) scale(0); }
    50% { transform: perspective(200px) rotateX(0deg) scale(1.3); }
    100% { transform: perspective(200px) rotateX(0deg) scale(1); }
}

.confetti {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #FFD700;
    transform: translate(-50%, -50%);
    animation: confettiExplosion 1s ease-out 0.8s both;
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FF69B4;
    border-radius: 50%;
}

.confetti::before {
    top: -20px;
    left: -15px;
    animation: confettiFall 1.5s ease-out 0.8s both;
}

.confetti::after {
    top: -15px;
    right: -20px;
    background: #00CED1;
    animation: confettiFall 1.5s ease-out 1s both;
}

@keyframes confettiExplosion {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100px) rotate(360deg); opacity: 0; }
}

.modal-content h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.close-btn {
    background: linear-gradient(45deg, #4CAF50 0%, #8BC34A 50%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: perspective(200px) rotateX(5deg);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.4);
}

.close-btn:hover {
    transform: perspective(200px) rotateX(0deg) translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.6);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .pets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .adoption-form {
        padding: 30px 20px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 30px;
    }
}