:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #10b981;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    padding: 0 1rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.cta-button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

/* Sections */
section {
    padding: 8rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.section-title span {
    color: var(--primary);
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.card-img {
    height: 350px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 1.5rem;
}

.player-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-country {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-name {
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.player-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

/* Filter Hub Styles */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.info-content-area {
    min-height: 400px;
    transition: all 0.5s ease;
}

.info-card-dynamic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--surface);
    border-radius: 30px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    align-items: center;
}

.info-img-dynamic {
    height: 400px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.info-text-dynamic h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.info-text-dynamic p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .info-card-dynamic {
        grid-template-columns: 1fr;
    }

    .info-img-dynamic {
        height: 250px;
    }
}

/* Chatbot Styles - Side Aligned Tab */
.chat-bubble {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px 0 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bubble:hover {
    width: 55px;
}

.chat-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.chat-bubble:hover .chat-icon {
    transform: rotate(20deg) scale(1.1);
}

.chat-window {
    position: fixed;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 2000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
}

.chat-window.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(30px) scale(0.95);
    pointer-events: none;
}


.chat-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 1rem;
    margin: 0;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: messageEntry 0.3s ease-out;
}

.message.bot {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-form {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 0.5rem;
}

.chat-input-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--background);
    color: white;
    outline: none;
}

.chat-input-form button {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-input-form button:hover {
    background: var(--primary-dark);
}

@keyframes messageEntry {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
    }
}