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

:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --success-color: #5CB85C;
    --danger-color: #D9534F;
    --warning-color: #F0AD4E;
    --dark: #2C3E50;
    --light: #ECF0F1;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.hidden {
    display: none !important;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

h2 {
    color: var(--dark);
    margin-bottom: 20px;
}

.auth-forms {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    font-weight: normal;
    line-height: 1.5;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #3A7BC8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #6C5CE7;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

header {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

header h1 {
    color: var(--dark);
    font-size: 1.8rem;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 600;
    color: var(--dark);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--light);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #D5DBDD;
}

.tab-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

.qr-scanner-container {
    text-align: center;
}

#qrReader {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

.manual-input {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.manual-input input {
    width: 250px;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.leaderboard-grid {
    display: grid;
    gap: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    transition: transform 0.3s;
}

.leaderboard-item:hover {
    transform: translateX(5px);
}

.rank {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 20px;
    min-width: 50px;
}

.rank.gold { color: #FFD700; }
.rank.silver { color: #C0C0C0; }
.rank.bronze { color: #CD7F32; }

.artist-info {
    flex: 1;
}

.artist-info h3 {
    margin-bottom: 5px;
}

.vote-stats {
    text-align: right;
}

.vote-stats .count {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.artist-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.artist-card:hover {
    transform: translateY(-5px);
}

.artist-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.artist-card-content {
    padding: 15px;
}

.artist-card h3 {
    margin-bottom: 10px;
}

.artist-card .category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.search-bar select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--success-color);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    animation: slideIn 0.3s;
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.modal-content .close:hover {
    color: #333;
}

.modal-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.modal-content .vote-count {
    font-size: 1.2rem;
    margin: 20px 0;
}

.modal-content .vote-count span {
    font-weight: bold;
    color: var(--primary-color);
}

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

.vote-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-item .artist-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.vote-item .vote-date {
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .artists-grid {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
    }
}