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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Container */
#login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.error-message {
    margin-top: 15px;
    padding: 10px;
    background: #ffebee;
    color: #c62828;
    border-radius: 6px;
    text-align: center;
}

/* App Container */
#app-container {
    min-height: 100vh;
    background: #f5f5f5;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: #667eea;
    font-size: 28px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-secondary {
    background: #6366f1;
    color: white;
}

.btn-secondary:hover {
    background: #4f46e5;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

/* Admin Button */
.btn-admin {
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 20px;
    margin: 20px auto;
    max-width: 1400px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 1;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Players Container */
#players-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px 20px;
}

#loading,
#no-players {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

#players-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Player Card */
.player-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.player-info h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captain-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.player-number {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.player-ratings {
    display: flex;
    gap: 8px;
}

.rating-btn {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-btn:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.rating-btn.active {
    background: #667eea;
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.thumbs-btn.active {
    background: #f44336;
    border-color: #f44336;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.4);
}

.star-btn.active {
    background: #ffc107;
    border-color: #ffc107;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
}

.instagram-link {
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border: 2px solid transparent;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
    color: white;
    filter: brightness(1);
}

.instagram-link:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
    box-shadow: 0 3px 10px rgba(225, 48, 108, 0.4);
}

.instagram-link.disabled {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    opacity: 0.5;
    filter: brightness(1);
}

.instagram-link.disabled:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
    transform: none;
    box-shadow: none;
}

.player-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    font-size: 14px;
    color: #666;
}

.detail-item strong {
    color: #333;
}

.player-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    gap: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .filters-section {
        flex-direction: column;
    }

    #players-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .player-stats {
        gap: 5px;
        padding-top: 12px;
    }

    .stat {
        min-width: 0;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    header {
        position: relative;
    }
    
    .header-content {
        padding: 15px 20px;
    }
    
    .header-content h1 {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .header-actions .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
