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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
sans-serif;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    min-height: 100vh;
    padding: 16px;
    padding-bottom: 80px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Loading */
#loading {
    text-align: center;
    padding-top: 40%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Welcome */
.welcome {
    text-align: center;
    padding-top: 30%;
}

.welcome h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.welcome p {
    color: var(--tg-theme-hint-color, #666);
    margin-bottom: 32px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    cursor: pointer;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    margin: 16px 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    border-radius: 2px;
    transition: width 0.3s;
}

/* Registration */
.reg-header h2 {
    text-align: center;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
}

.form-group textarea {
    resize: none;
    min-height: 100px;
}

/* Interests chips */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.interest-chip {
    padding: 10px 16px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.interest-chip.selected {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border-color: transparent;
    color: white;
}

/* Gender buttons */
.gender-select {
    display: flex;
    gap: 8px;
}

.gender-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
}

.gender-btn.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Navigation buttons */
.reg-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.btn-back {
    flex: 1;
    padding: 14px;
    border: none;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
}

.btn-next {
    flex: 2;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Swipe card */
#card-container {
    margin-bottom: 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-photo {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: #eee;
}

.card-info {
    padding: 16px;
}

.card-info h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.card-info .city {
    color: #666;
    margin-bottom: 8px;
}

.card-info .bio {
    margin-bottom: 12px;
}

.compatibility-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.hobby-tag {
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 12px;
}

/* Swipe buttons */
.swipe-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.btn-swipe {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-dislike {
    background: #fff;
}

.btn-like {
    background: #4CAF50;
}

.btn-superlike {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
}

.swipe-info {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* No candidates */
.no-candidates {
    text-align: center;
    padding-top: 30%;
    color: #666;
}

/* Matches */
.match-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
}

.match-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    background: #ddd;
}

.match-info h4 {
    margin-bottom: 4px;
}

.match-info span {
    color: #666;
    font-size: 13px;
}

/* Bottom nav */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--tg-theme-bg-color, #fff);
    border-top: 1px solid #eee;
    padding: 12px 0;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 24px;
    padding: 8px 24px;
    cursor: pointer;
    opacity: 0.5;
}

.nav-btn.active {
    opacity: 1;
}

