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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    height: 100%;
    overflow: hidden;
}

body {
    -webkit-overflow-scrolling: touch;
    position: relative;
}

#app {
    height: 100%;
    overflow: hidden;
}

.page {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    position: relative;
}

.hidden {
    display: none !important;
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-container h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
}

.mobile-header {
    background: white;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header h1 {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    margin: 0 40px;
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    position: absolute;
    left: 10px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-content h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.search-bar {
    background: white;
    padding: 15px;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.filter-tabs {
    background: white;
    display: flex;
    padding: 10px 15px;
    gap: 10px;
    overflow-x: auto;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.filter-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.activity-list {
    padding: 15px;
    padding-bottom: 80px;
    height: calc(100% - 200px);
    overflow-y: auto;
}

.activity-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.activity-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.activity-card-type {
    display: inline-block;
    padding: 4px 10px;
    background: #e9ecef;
    color: #666;
    border-radius: 12px;
    font-size: 12px;
}

.activity-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    color: #666;
    font-size: 13px;
}

.activity-card-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.activity-card-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.load-more {
    text-align: center;
    padding: 20px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    gap: 5px;
}

.nav-item.active {
    color: #667eea;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.page-content {
    padding: 15px;
    padding-bottom: 80px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.activity-detail-content {
    padding: 15px;
    padding-bottom: 80px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.detail-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detail-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 13px;
}

.detail-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detail-section h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-info-label {
    color: #999;
    font-size: 12px;
}

.detail-info-value {
    color: #333;
    font-weight: 500;
}

.detail-description {
    color: #666;
    line-height: 1.8;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.detail-actions .btn {
    flex: 1;
}

.participant-list {
    list-style: none;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    background-size: cover;
    background-position: center;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 500;
    color: #333;
}

.participant-meta {
    font-size: 12px;
    color: #999;
}

.my-activities-tabs {
    background: white;
    display: flex;
    padding: 10px 15px;
    gap: 10px;
}

.my-tab {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.my-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.avatar-section {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ddd;
    background-size: cover;
    background-position: center;
    margin: 0 auto;
    border: 4px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qrcode-container {
    text-align: center;
    padding: 30px;
}

.qrcode-image {
    max-width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    background: white;
}

.qrcode-info {
    color: #666;
    margin-bottom: 20px;
}

.checkpoint-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.checkpoint-card h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.checkpoint-info {
    color: #666;
    margin-bottom: 15px;
}

.checkpoint-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 12px;
    margin-bottom: 15px;
}

.checkpoint-btn {
    width: 100%;
}

.checkin-time {
    color: #999;
    font-size: 12px;
}

@media (max-width: 480px) {
    .detail-info {
        grid-template-columns: 1fr;
    }
    
    .activity-card-info {
        flex-direction: column;
        gap: 8px;
    }
}