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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #667eea;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.header {
    background: #ff6b6b;
    padding: 40px 30px 30px 30px;
    text-align: center;
    color: white;
    position: relative;
}

.header::before {
    content: '🐕';
    position: center;
    top: 10px;
    right: 30px;
    font-size: 3rem;
    opacity: 0.9;
}

.header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.main-content {
    padding: 40px 30px;
}

.generator-section {
    text-align: center;
    margin-bottom: 40px;
}

.generate-btn {
    background: #667eea;
    border: none;
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

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

.generate-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

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

.result-card {
    background: #f093fb;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.result-card.show {
    transform: scale(1);
    opacity: 1;
}

.result-card::before {
    content: '🐾';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 3rem;
    opacity: 0.1;
    transform: rotate(15deg);
}

.dog-name {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -15px, 0);
    }
    70% {
        transform: translate3d(0, -7px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
}

.action-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn.liked {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.action-btn.disliked {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.favorites-section {
    background: #a8edea;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.favorites-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-btn {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.clear-btn:hover {
    background: #ee5a24;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

.favorites-list {
    display: grid;
    gap: 15px;
}

.favorite-item {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.favorite-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorite-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.remove-btn {
    background: #ff6b6b;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
    color: #2c3e50;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.7;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.adsense-banner {
    background: #ffffff;
    border: none;
    border-radius: 0px;
    padding: 20px 10px;
    text-align: center;
    margin: 30px 0;
    color: #6c757d;
    font-style: italic;
}

.hidden {
    display: none;
}

.nav-menu {
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 20px;
    }

    .header {
        padding: 30px 20px;
    }

    .main-content {
        padding: 30px 20px;
    }

    .generate-btn {
        padding: 16px 30px;
        font-size: 1.1rem;
    }

    .result-card {
        padding: 25px 20px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 200px;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .favorites-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
}