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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-item .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.score-value {
    font-size: 1.8em;
    font-weight: bold;
    margin-top: 5px;
}

.tab-menu {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

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

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

h3 {
    color: #764ba2;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Images */
.hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

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

.section-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

/* Breed Cards */
.breed-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.breed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.breed-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    overflow: hidden;
}

.breed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.breed-card:hover .breed-image img {
    transform: scale(1.1);
}

.breed-info {
    padding: 20px;
}

.breed-info h4 {
    color: #d63031;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.breed-info p {
    line-height: 1.6;
    color: #2d3436;
}

/* Wild Cat Cards */
.wild-cat-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.wild-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.wild-cat-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    overflow: hidden;
}

.wild-cat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wild-cat-card:hover .wild-cat-image img {
    transform: scale(1.05);
}

.wild-cat-info {
    padding: 25px;
}

.wild-cat-info h4 {
    color: #6c5ce7;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.wild-cat-info ul {
    list-style-position: inside;
    line-height: 1.8;
}

.wild-cat-info li {
    margin-bottom: 10px;
    color: #2d3436;
}

.cat-section {
    margin-bottom: 30px;
}

.fact-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.fact-card h4 {
    color: #d63031;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.fact-card ul {
    list-style-position: inside;
    line-height: 1.8;
}

.fact-card li {
    margin-bottom: 8px;
}

.fact-card p {
    line-height: 1.6;
}

.fun-fact {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
    font-size: 1.1em;
    text-align: center;
}

.fun-fact p {
    margin: 0;
}

.question-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.question-number {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

#questionText {
    color: #2d3436;
    font-size: 1.4em;
    margin-bottom: 20px;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.question-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.answer-btn {
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #667eea;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.answer-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(10px);
}

.answer-btn.selected {
    background: #667eea;
    color: white;
}

.answer-btn.correct {
    background: #00b894;
    color: white;
    border-color: #00b894;
}

.answer-btn.incorrect {
    background: #d63031;
    color: white;
    border-color: #d63031;
}

.answer-btn:disabled {
    cursor: not-allowed;
}

.feedback {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.1em;
    text-align: center;
    animation: slideIn 0.5s;
}

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

.feedback.correct {
    background: #00b894;
    color: white;
}

.feedback.incorrect {
    background: #d63031;
    color: white;
}

.hidden {
    display: none;
}

.quiz-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #636e72;
    color: white;
}

.btn-secondary:hover {
    background: #2d3436;
}

.btn-danger {
    background: #d63031;
    color: white;
    margin-top: 30px;
}

.btn-danger:hover {
    background: #e17055;
}

.results {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
}

.results h3 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
}

.result-score {
    font-size: 1.8em;
    margin: 20px 0;
    color: #2d3436;
}

.result-percentage {
    font-size: 2.5em;
    font-weight: bold;
    color: #00b894;
    margin: 20px 0;
}

.result-message {
    font-size: 1.3em;
    color: #636e72;
    margin: 20px 0 30px 0;
}

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

.stat-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    color: #d63031;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #636e72;
}

.achievements h3 {
    margin-bottom: 20px;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.achievement {
    background: white;
    border: 2px solid #e9ecef;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.achievement.unlocked {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-color: #f5576c;
}

.achievement-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.achievement-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2d3436;
}

.achievement-desc {
    font-size: 0.9em;
    color: #636e72;
}

.achievement.locked {
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    header {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .score-board {
        gap: 15px;
    }

    .score-value {
        font-size: 1.4em;
    }

    .tab-btn {
        font-size: 0.9em;
        padding: 12px 8px;
    }

    .tab-content {
        padding: 15px;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.3em;
    }

    .hero-image img {
        max-height: 400px;
    }

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

    .breed-card {
        flex-direction: column;
    }

    .quiz-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .stat-number {
        font-size: 2.5em;
    }

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

    .results h3 {
        font-size: 2em;
    }

    .result-percentage {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .score-item .label {
        font-size: 0.8em;
    }

    .score-value {
        font-size: 1.2em;
    }

    .tab-btn {
        font-size: 0.8em;
        padding: 10px 5px;
    }

    h2 {
        font-size: 1.3em;
    }

    .fact-card, .breed-info, .wild-cat-info {
        padding: 15px;
    }

    #questionText {
        font-size: 1.2em;
    }

    .answer-btn {
        font-size: 1em;
        padding: 12px 15px;
    }
}

/* Additional improvements for tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 750px;
    }

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

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