@import url('https://fonts.googleapis.com/css2?family=Supercell-Magic&display=swap');
@font-face {
    font-family: 'Clash Regular';
    src: url('Clash_Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

:root {
    --coc-blue: #0c3b80;
    --coc-light-blue: #6a9bc9;
    --coc-gold: #ffcc57;
    --coc-red: #e63e31;
    --coc-green: #50af50;
    --coc-dark: #232b38;
    --box-bg: rgba(20, 30, 60, 0.7);
    --box-border: rgba(106, 155, 201, 0.5);
}

body {
    font-family: 'Clash Regular', 'Supercell-Magic', 'Trebuchet MS', sans-serif;
    background-color: #14192d;
    background-image: url('./wallpapersden.com_clash-of-clans-9th-anniversary-4k_3000x1385.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: white;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: rgba(12, 59, 128, 0.7);
    background-image: linear-gradient(160deg, rgba(12, 59, 128, 0.7) 0%, rgba(5, 29, 64, 0.7) 100%);
    color: var(--coc-gold);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--coc-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

header h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.header-icon {
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.1);
}

.header-barbarian {
    position: absolute;
    left: 20px;
    bottom: -10px;
    height: 100px;
    z-index: 1;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
}

.header-wizard {
    position: absolute;
    right: 20px;
    bottom: -10px;
    height: 100px;
    z-index: 1;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
}

.api-token-section,
.search-section {
    background-color: var(--box-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    border: 2px solid var(--box-border);
    backdrop-filter: blur(10px);
}

.api-token-section h2 {
    margin-bottom: 15px;
    color: var(--coc-gold);
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.api-token-section p {
    margin-bottom: 15px;
    color: #e0e0e0;
}

.token-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    font-weight: bold;
}

.token-status.success {
    background-color: rgba(80, 175, 80, 0.2);
    color: #90ee90;
    border: 1px solid var(--coc-green);
}

.token-status.error {
    background-color: rgba(230, 62, 49, 0.2);
    color: #ff9999;
    border: 1px solid var(--coc-red);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--coc-gold);
    font-size: 1.1rem;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--coc-blue);
    background-color: rgba(20, 20, 40, 0.6);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

input:focus {
    border-color: var(--coc-gold);
    outline: none;
    box-shadow: 0 0 8px var(--coc-gold), inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hint {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 6px;
}

button {
    background: linear-gradient(to bottom, rgba(12, 59, 128, 0.8), rgba(7, 44, 97, 0.8));
    color: var(--coc-gold);
    border: 2px solid var(--coc-gold);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Clash Regular', 'Supercell-Magic', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.2em;
}

button:hover {
    background: linear-gradient(to bottom, rgba(16, 80, 160, 0.8), rgba(12, 59, 128, 0.8));
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.results-container {
    background-color: var(--box-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    min-height: 200px;
    border: 2px solid var(--box-border);
    backdrop-filter: blur(10px);
}

.loading {
    text-align: center;
    font-style: italic;
    color: #a0a0a0;
    display: none;
    padding: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 5px solid rgba(255, 204, 87, 0.3);
    border-radius: 50%;
    border-top-color: var(--coc-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    color: #ff9999;
    background-color: rgba(230, 62, 49, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    border: 1px solid var(--coc-red);
}

.player-details {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

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

.player-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--coc-gold);
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--coc-gold);
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.player-tag {
    color: var(--coc-light-blue);
    font-size: 16px;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(20, 40, 100, 0.5) 0%, rgba(10, 20, 50, 0.6) 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--box-border);
    transition: transform 0.2s ease;
    backdrop-filter: blur(5px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--coc-gold);
    background: linear-gradient(135deg, rgba(20, 40, 100, 0.6) 0%, rgba(10, 20, 50, 0.7) 100%);
}

.stat-title {
    font-size: 14px;
    color: var(--coc-light-blue);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--coc-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.player-clan {
    background: linear-gradient(135deg, rgba(20, 40, 100, 0.5) 0%, rgba(10, 20, 50, 0.6) 100%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--box-border);
    backdrop-filter: blur(5px);
}

.player-clan h3 {
    color: var(--coc-gold);
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--coc-gold);
    padding-bottom: 8px;
}

.clan-info p {
    margin-bottom: 8px;
}

.clan-info strong {
    color: var(--coc-light-blue);
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #a0a0a0;
}

footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

footer a {
    color: var(--coc-light-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--coc-gold);
    text-decoration: underline;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.social-icon {
    color: var(--coc-light-blue);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-icon:hover {
    color: var(--coc-gold);
    opacity: 1;
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.6rem;
        gap: 10px;
        flex-direction: column;
    }
    
    .header-icon {
        height: 40px;
    }
    
    .header-barbarian, 
    .header-wizard {
        height: 80px;
    }
    
    .player-stats {
        grid-template-columns: 1fr;
    }
} 