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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #12122e 50%, #1a1a3e 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

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

h1 {
    font-size: 42px;
    background: linear-gradient(135deg, #fff, #e65c00, #F9D423);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    letter-spacing: 1px;
}

.user-profile {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 8px 20px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

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

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e65c00, #F9D423);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #1a1a2e;
}

.user-name {
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.stats-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.3);
    padding: 6px 15px;
    border-radius: 40px;
}

.change-name-btn {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 18px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 13px;
}

.change-name-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.category-card {
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    transform: rotate(0deg);
    animation: cardFloat 0.6s ease backwards;
    position: relative;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardFloat {
    from { opacity: 0; transform: translateY(40px) rotate(2deg); }
    to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.category-card:hover { transform: translateY(-12px) rotate(1deg); }

.category-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: all 0.5s ease;
    filter: brightness(0.7) saturate(0.9);
}

.category-card:hover .category-image {
    filter: brightness(1) saturate(1.2);
    transform: scale(1.02);
}

.category-info {
    padding: 24px;
    text-align: center;
    position: relative;
}

.category-card.movies .category-info { background: linear-gradient(135deg, #0a1628, #0d1f3a); }
.category-card.games .category-info { background: linear-gradient(135deg, #1a0a2e, #2a0a3e); }
.category-card.music .category-info { background: linear-gradient(135deg, #2e1a0a, #3e2a1a); }

.category-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.category-card.movies .category-title {
    background: linear-gradient(135deg, #4a9eff, #00c6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(74, 158, 255, 0.3);
}

.category-card.games .category-title {
    background: linear-gradient(135deg, #c84eff, #ff00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(200, 78, 255, 0.3);
}

.category-card.music .category-title {
    background: linear-gradient(135deg, #ff6a4a, #ffb84a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(255, 107, 74, 0.3);
}

.category-tagline {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 8px;
    opacity: 0.7;
}

.category-card.movies .category-tagline { color: #4a9eff; }
.category-card.games .category-tagline { color: #c84eff; }
.category-card.music .category-tagline { color: #ff6a4a; }

.question-container {
    background: rgba(255,255,255,0.95);
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 16px;
}

.answer-option:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.answer-option.selected {
    border-color: #e65c00;
    background: #fff0e6;
}

.progress {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    height: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #e65c00, #F9D423);
    height: 100%;
    transition: width 0.3s;
}

.next-btn {
    background: linear-gradient(135deg, #e65c00, #F9D423);
    color: #1a1a2e;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    margin-top: 25px;
}

.next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    display: inline-block;
}

.result-container {
    background: rgba(255,255,255,0.95);
    border-radius: 28px;
    padding: 30px;
    text-align: center;
}

.result-emoji {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 15px;
}

.result-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.stats-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.stats-title {
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.stat-item {
    margin-bottom: 12px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
}

.stat-bar {
    background: #e0e0e0;
    border-radius: 20px;
    height: 25px;
    overflow: hidden;
}

.stat-fill {
    background: linear-gradient(90deg, #e65c00, #F9D423);
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 12px;
    font-weight: bold;
    transition: width 0.5s;
}

.results-table-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.table-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 2px solid #e0e0e0;
    color: #666;
    font-weight: 600;
    font-size: 13px;
}

.results-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.rank-1 { color: #ffd700; font-weight: bold; }
.rank-2 { color: #c0c0c0; font-weight: bold; }
.rank-3 { color: #cd7f32; font-weight: bold; }

.recent-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #e65c00, #F9D423);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #1a1a2e;
}

.recent-name {
    font-weight: 600;
    color: #1a1a2e;
}

.recent-result {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.recent-time {
    font-size: 11px;
    color: #999;
}

.again-btn {
    background: linear-gradient(135deg, #434343, #1a1a1a);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
}

.loading {
    text-align: center;
    color: white;
    padding: 50px;
    font-size: 18px;
}

.status-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 11px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 28px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    text-align: center;
    margin: 20px 0;
}

.modal-btn {
    background: linear-gradient(135deg, #e65c00, #F9D423);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 700px) {
    .categories-grid { gap: 25px; }
    .category-image { height: 200px; }
    .category-title { font-size: 24px; }
    h1 { font-size: 28px; }
    .results-table th, .results-table td { font-size: 11px; padding: 8px 4px; }
    .recent-item { flex-direction: column; align-items: flex-start; }
}