:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.search-section {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.tab-icon {
    font-size: 1.25rem;
}

.search-form {
    display: none;
}

.search-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    padding: 1.25rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.search-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.25rem;
}

.loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 700px;
    text-align: center;
}

.error-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.error-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.results-section {
    max-width: 900px;
    margin: 0 auto;
}

.player-results,
.clan-results {
    display: none;
}

.player-results.active,
.clan-results.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
}

.player-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.player-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-tag {
    color: var(--text-secondary);
    font-size: 1rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.highlight {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
}

.clan-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.clan-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clan-tag {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.clan-description {
    color: var(--text-secondary);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.clan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.footer {
    text-align: center;
    margin-top: 5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-note {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.loading {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 700px;
    text-align: center;
}

.error-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.error-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.results-section {
    max-width: 900px;
    margin: 0 auto;
}

.player-results,
.clan-results {
    display: none;
}

.player-results.active,
.clan-results.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
}

.player-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.player-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-tag {
    color: var(--text-secondary);
    font-size: 1rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.highlight {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
}

.clan-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.clan-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clan-tag {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.clan-description {
    color: var(--text-secondary);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.clan-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.footer {
    text-align: center;
    margin-top: 5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-note {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: 1rem 1.5rem;
    }

    .search-input {
        min-height: 48px;
        font-size: 16px;
    }

    .player-stats,
    .clan-stats {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .player-card,
    .clan-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0.75rem;
    }

    .search-section {
        margin-bottom: 2rem;
    }
}