* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: #667eea;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #667eea;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Tournament Info */
.tournament-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tournament-info h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.tournament-completed {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tournament-completed h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.match-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.match-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.btn-vote {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-vote:hover {
    background: #5568d3;
}

/* Match View */
.match-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.match-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.match-header h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.match-status {
    color: #666;
    font-size: 1.1rem;
}

.voting-area {
    margin: 2rem 0;
}

.current-score {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 2px solid #667eea;
}

.current-score p {
    margin: 0.5rem 0;
    color: #333;
}

.current-score strong {
    color: #667eea;
    font-size: 1.2rem;
}

.total-votes {
    color: #666;
    font-size: 0.9rem;
}

.votes-summary {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.meme-pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.meme-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.meme-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.meme-media {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.meme-media img,
.meme-media video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.meme-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    word-break: break-word;
}

.votes-count {
    color: #666;
    font-size: 0.9rem;
}

.vote-btn {
    width: 100%;
    padding: 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.vote-btn:hover {
    background: #5568d3;
}

.vote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.vs-divider {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.match-result {
    text-align: center;
    padding: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.vote-message {
    margin-top: 1rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

/* Leaderboard */
.leaderboard-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard-container h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.leaderboard-subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.leaderboard-table {
    overflow-x: auto;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.leaderboard-table tr:hover {
    background: #f8f9fa;
}

.rank {
    font-weight: bold;
    font-size: 1.2rem;
}

.points {
    font-size: 1.2rem;
    color: #667eea;
}

.thumbnail {
    max-width: 100px;
    max-height: 100px;
    border-radius: 5px;
    object-fit: cover;
}

.no-matches,
.no-memes {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .meme-pair {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .vs-divider {
        text-align: center;
        margin: 1rem 0;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 1rem;
    }
}

