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

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 5px solid #ffd700;
}

.header-content h1 {
    font-size: 3rem;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

.tagline {
    font-size: 1.2rem;
    color: #fff;
    font-style: italic;
}

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

nav {
    background: #2d3748;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    font-weight: bold;
    display: block;
}

nav ul li a:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 4px solid #ffd700;
}

.hero h2 {
    font-size: 2.5rem;
    color: #764ba2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
}

.clans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.clan-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.clan-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.clan-card.thunder {
    border-color: #f59e0b;
}

.clan-card.river {
    border-color: #3b82f6;
}

.clan-card.shadow {
    border-color: #6b21a8;
}

.clan-card.wind {
    border-color: #3b82f6;
}

.clan-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.clan-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.clan-image {
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
}

.thunder-bg {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

.river-bg {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
}

.shadow-bg {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 50%, #6b21a8 100%);
}

.wind-bg {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 50%, #60a5fa 100%);
}

.clan-trait {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    font-style: italic;
}

.fun-facts {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 4px solid #ffd700;
}

.fun-facts h2 {
    text-align: center;
    font-size: 2rem;
    color: #764ba2;
    margin-bottom: 2rem;
}

.facts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.fact-box {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.fact-box:hover {
    transform: scale(1.05);
}

.fact-box h4 {
    font-size: 1.3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

.small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Clan Detail Page Styles */
.clan-detail {
    margin-bottom: 3rem;
}

.detail-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid;
    text-align: center;
}

.detail-card.thunder {
    border-color: #f59e0b;
}

.detail-card.river {
    border-color: #3b82f6;
}

.detail-card.shadow {
    border-color: #6b21a8;
}

.detail-card.wind {
    border-color: #3b82f6;
}

.detail-card .clan-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.detail-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.detail-card .clan-info {
    margin-top: 1.5rem;
}

.detail-card .clan-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-top: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.detail-box h4 {
    font-size: 1.5rem;
    color: #764ba2;
    margin-bottom: 1rem;
    text-align: center;
}

.detail-box p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

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

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

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

    .detail-card .clan-icon {
        font-size: 3rem;
    }
}

/* Warrior Code Page Styles */
.code-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.code-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #f59e0b;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.code-number {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.code-content h3 {
    font-size: 1.5rem;
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.code-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
}

/* Territories Page Styles */
.territories-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.territory-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.territory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.territory-card.thunder {
    border-color: #f59e0b;
}

.territory-card.river {
    border-color: #3b82f6;
}

.territory-card.shadow {
    border-color: #6b21a8;
}

.territory-card.wind {
    border-color: #3b82f6;
}

.territory-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2d3748;
    text-align: center;
}

.territory-info {
    margin-top: 1.5rem;
}

.territory-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin: 0.5rem 0;
}

.territory-info strong {
    color: #764ba2;
}

.neutral-zone {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px dashed #764ba2;
    text-align: center;
    margin-top: 1rem;
}

.neutral-zone h3 {
    font-size: 2rem;
    color: #764ba2;
    margin-bottom: 1rem;
}

.zone-info {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* Medicine Cats Herbs Styles */
.herbs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.herb-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #059669;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.herb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(5, 150, 105, 0.3);
}

.herb-card h4 {
    font-size: 1.3rem;
    color: #059669;
    margin-bottom: 0.5rem;
}

.herb-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .code-card {
        flex-direction: column;
        text-align: center;
    }

    .code-number {
        align-self: center;
    }

    .herbs-container {
        grid-template-columns: 1fr;
    }
}
