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

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

#app {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

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

/* Login */
#login-screen {
    text-align: center;
    padding-top: 80px;
}

.app-logo {
    font-size: 100px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    color: white;
    font-size: 36px;
    margin-bottom: 5px;
}

.tagline {
    color: rgba(255,255,255,0.8);
    margin-bottom: 50px;
}

.role-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.role-btn {
    background: white;
    border: none;
    border-radius: 24px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.role-btn:hover {
    transform: translateY(-5px) scale(1.02);
}

.role-btn .icon {
    font-size: 50px;
    margin-bottom: 10px;
    display: block;
}

.role-btn .title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.role-btn .desc {
    font-size: 14px;
    color: #666;
}

/* Header */
header {
    display: flex;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 12px;
    margin-right: 15px;
}

h2 {
    color: white;
    flex: 1;
}

/* Dashboard Styles */
.stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.stat {
    flex: 1;
    background: rgba(255,255,255,0.95);
    padding: 20px 15px;
    border-radius: 16px;
    text-align: center;
}

.stat .number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.stat .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* FAB */
.fab {
    width: 100%;
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 25px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(255,107,107,0.4);
}

.fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.5);
}

/* Mission Cards */
.missions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mission-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mission-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mission-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.mission-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-tag {
    background: #e0e7ff;
    color: #667eea;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.xp-reward {
    background: linear-gradient(135deg, #ffd93d, #ff6b6b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Form Styles */
.form {
    background: white;
    border-radius: 24px;
    padding: 30px;
}

.form input,
.form select {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
}

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

.xp-selector {
    margin-bottom: 25px;
}

.xp-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.xp-options {
    display: flex;
    gap: 10px;
}

.xp-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.xp-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

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

/* Cleaner Dashboard */
.level-info {
    text-align: right;
    color: white;
}

.level {
    display: block;
    font-size: 14px;
    opacity: 0.9;
}

.xp {
    font-size: 12px;
    opacity: 0.7;
}

.progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ffd93d;
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.badge-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.badge {
    background: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #333;
}

.badges-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 40px;
}

h3 {
    color: white;
    margin: 30px 0 15px;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-card .number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.stat-card .label {
    font-size: 11px;
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Mission Detail */
.mission-info {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.checklist {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

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

.checklist-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    accent-color: #667eea;
}

.checklist-item span {
    flex: 1;
    font-size: 16px;
}

.checklist-item.completed span {
    text-decoration: line-through;
    color: #999;
}

.complete-btn {
    margin-top: 20px;
}

.complete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    z-index: 1000;
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(100px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1