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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

nav {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view.active {
    display: block;
}

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

/* Leaderboard */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.leaderboard-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.leaderboard-list {
    display: grid;
    gap: 15px;
}

.leaderboard-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
}

.leaderboard-item .rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
}

.leaderboard-item .logo-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.leaderboard-item .logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: opacity 0.2s ease;
}

.leaderboard-item .logo-fallback {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaderboard-item .logo-fallback span {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.leaderboard-item .info {
    flex: 1;
}

.leaderboard-item .name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.leaderboard-item .score {
    color: #666;
    font-weight: 500;
}

/* Battle View */
.battle-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.battle-header h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.battle-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.company-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

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

.company-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    position: relative;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 20px;
    transition: opacity 0.2s ease;
}

.logo-fallback-large {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto 20px;
}

.logo-fallback-large span {
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

.company-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.company-card .score {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
}

.vote-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.vote-btn:active {
    transform: translateY(0);
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .battle-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vs-divider {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
        margin: 0 auto;
    }
    
    .company-card {
        padding: 20px;
    }
    
    .company-logo {
        width: 100px;
        height: 100px;
    }
    
    .leaderboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .battle-header h2 {
        font-size: 1.5rem;
    }
    
    .company-card h3 {
        font-size: 1.3rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
.vote-success {
    animation: voteSuccess 0.6s ease;
}

@keyframes voteSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Company change animations */
.slide-out {
    animation: slideOut 0.3s ease-out forwards;
}

.slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideOut {
    0% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateX(-100px) scale(0.8);
        opacity: 0;
    }
}

@keyframes slideIn {
    0% { 
        transform: translateX(100px) scale(0.8);
        opacity: 0;
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
} 