/* KindTaken - Main Styles */
/* Compatible with iOS 12 Safari */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: #f2f2f7;
    color: #1c1c1e;
    -webkit-user-select: none;
    user-select: none;
    min-height: 100vh;
}

#app {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Screen container */
.screen {
    min-height: 100vh;
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
}

/* Header */
.screen-header {
    width: 100%;
    max-width: 800px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 8px;
}

.screen-title {
    font-size: 34px;
    font-weight: 800;
    color: #1c1c1e;
    letter-spacing: -0.5px;
}

.back-btn {
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.back-btn:active {
    background: #e5e5ea;
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    -webkit-transition: transform 0.2s ease;
    transition: transform 0.2s ease;
}

.card:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
}

.card-interactive {
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 50px;
}

.btn:active {
    -webkit-transform: scale(0.97);
    transform: scale(0.97);
}

.btn-primary {
    background: #7c4dff;
    color: white;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.25);
}

.btn-primary:active {
    background: #6a3de8;
    box-shadow: 0 1px 4px rgba(124, 77, 255, 0.25);
}

.btn-secondary {
    background: #f2f2f7;
    color: #1c1c1e;
    box-shadow: none;
}

.btn-secondary:active {
    background: #e5e5ea;
}

.btn-danger {
    background: #ff3b30;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
}

.btn-danger:active {
    background: #e0332b;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
    min-height: 36px;
}

.btn-full {
    width: 100%;
    display: block;
}

.btn-icon {
    background: #f2f2f7;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    cursor: pointer;
}

.btn-icon:active {
    background: #e5e5ea;
}

/* Grid layouts */
.child-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 16px;
    -webkit-justify-content: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
}

.child-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    width: calc(50% - 8px);
    min-width: 200px;
    max-width: 350px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.child-card:active {
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.child-avatar {
    font-size: 64px;
    line-height: 1;
}

.child-name {
    font-size: 22px;
    font-weight: 700;
    color: #1c1c1e;
}

/* Moment cards */
.moment-card {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
}

.moment-icon {
    font-size: 48px;
    line-height: 1;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.moment-info {
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

.moment-name {
    font-size: 20px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.moment-time {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 8px;
}

/* Task items */
.task-item {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5ea;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

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

.task-checkbox {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2.5px solid #d1d1d6;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    font-size: 18px;
}

.task-checkbox.checked {
    background: #34c759;
    border-color: #34c759;
    -webkit-animation: checkBounce 0.4s ease;
    animation: checkBounce 0.4s ease;
}

.task-icon {
    font-size: 28px;
    line-height: 1;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.task-name {
    font-size: 17px;
    font-weight: 500;
    -webkit-flex: 1;
    flex: 1;
    color: #1c1c1e;
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: #8e8e93;
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: #e5e5ea;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #7c4dff;
    border-radius: 4px;
    -webkit-transition: width 0.5s ease;
    transition: width 0.5s ease;
}

.progress-fill.complete {
    background: #34c759;
}

.progress-text {
    font-size: 13px;
    color: #8e8e93;
    margin-top: 4px;
    text-align: center;
}

/* No active moments */
.empty-state {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    gap: 16px;
}

.empty-state-icon {
    font-size: 80px;
    line-height: 1;
}

.empty-state-text {
    font-size: 20px;
    font-weight: 600;
    color: #1c1c1e;
}

.empty-state-sub {
    font-size: 15px;
    color: #8e8e93;
}

/* Admin styles */
.admin-section {
    margin-bottom: 24px;
    width: 100%;
    max-width: 800px;
}

.admin-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    padding-left: 4px;
}

.admin-item {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5ea;
}

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

.admin-item-info {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 12px;
}

.admin-item-icon {
    font-size: 28px;
}

.admin-item-name {
    font-size: 17px;
    font-weight: 600;
    color: #1c1c1e;
}

.admin-item-actions {
    display: -webkit-flex;
    display: flex;
    gap: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    width: 100%;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d1d6;
    border-radius: 10px;
    font-size: 17px;
    background: #f2f2f7;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    color: #1c1c1e;
}

.form-input:focus {
    border-color: #7c4dff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.12);
}

.form-input[type="time"] {
    padding: 12px 16px;
}

/* Pin input */
.pin-input-group {
    display: -webkit-flex;
    display: flex;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 20px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d1d1d6;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.pin-dot.filled {
    background: #1c1c1e;
}

.pin-numpad {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    max-width: 300px;
    margin: 0 auto;
}

.pin-key {
    width: 75px;
    height: 75px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    font-size: 28px;
    font-weight: 400;
    color: #1c1c1e;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-transition: all 0.15s ease;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.pin-key:active {
    background: #e5e5ea;
    -webkit-transform: scale(0.93);
    transform: scale(0.93);
}

.pin-key.pin-delete {
    font-size: 20px;
    background: transparent;
    color: #ff3b30;
    box-shadow: none;
}

.pin-key.pin-empty {
    visibility: hidden;
}

/* Avatar picker */
.avatar-picker {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 12px 0;
}

.avatar-option {
    width: 56px;
    height: 56px;
    font-size: 36px;
    border: 2.5px solid transparent;
    border-radius: 14px;
    background: #f2f2f7;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.avatar-option.selected {
    border-color: #7c4dff;
    background: rgba(124, 77, 255, 0.08);
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}

/* Day picker */
.day-picker {
    display: -webkit-flex;
    display: flex;
    gap: 8px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 8px 0;
}

.day-btn {
    width: 40px;
    height: 40px;
    border: 1.5px solid #d1d1d6;
    border-radius: 50%;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.day-btn.active {
    border-color: #7c4dff;
    background: #7c4dff;
    color: white;
}

/* Icon picker */
.icon-picker {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 8px 0;
}

.icon-option {
    width: 48px;
    height: 48px;
    font-size: 28px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f2f2f7;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    cursor: pointer;
}

.icon-option.selected {
    border-color: #7c4dff;
    background: rgba(124, 77, 255, 0.08);
}

/* Settings button (parent access) */
.settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    z-index: 100;
    opacity: 0.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Pet button (nav) */
.pet-nav-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    font-size: 32px;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    -webkit-animation: petBobble 2s ease-in-out infinite;
    animation: petBobble 2s ease-in-out infinite;
    padding: 0;
    overflow: hidden;
}

.pet-nav-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Setup wizard */
.wizard-step {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    text-align: center;
}

.wizard-title {
    font-size: 34px;
    font-weight: 800;
    color: #1c1c1e;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.wizard-subtitle {
    font-size: 17px;
    color: #8e8e93;
    margin-bottom: 32px;
}

.wizard-emoji {
    font-size: 80px;
    margin-bottom: 24px;
    line-height: 1;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 20px;
    text-align: left;
}

.modal-actions {
    display: -webkit-flex;
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions .btn {
    -webkit-flex: 1;
    flex: 1;
}

/* Tab navigation for admin */
.admin-tabs {
    display: -webkit-flex;
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px;
    background: #e5e5ea;
    border-radius: 10px;
}

.admin-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    color: #1c1c1e;
    cursor: pointer;
    white-space: nowrap;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    -webkit-flex: 1;
    flex: 1;
    text-align: center;
}

.admin-tab.active {
    background: #ffffff;
    color: #1c1c1e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Celebration overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    pointer-events: auto;
}

.celebration-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    -webkit-animation: celebrationPop 0.5s ease;
    animation: celebrationPop 0.5s ease;
}

.celebration-emoji {
    font-size: 80px;
    line-height: 1;
    margin-bottom: 16px;
}

.celebration-text {
    font-size: 28px;
    font-weight: 800;
    color: #1c1c1e;
    margin-bottom: 8px;
}

.celebration-sub {
    font-size: 17px;
    color: #8e8e93;
    margin-bottom: 24px;
}

/* Quests (Opdrachten) */
.quest-card {
    background: #fff8f0;
    border: 1.5px solid #ffcc80;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.quest-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 183, 77, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.quest-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff9500;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    font-size: 24px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
    -webkit-animation: questPulse 2s ease-in-out infinite;
    animation: questPulse 2s ease-in-out infinite;
}

.quest-name {
    font-size: 17px;
    font-weight: 700;
    color: #e65100;
}

.quest-reward {
    font-size: 13px;
    font-weight: 600;
    color: #ff9500;
    margin-top: 2px;
}

.quest-timer {
    text-align: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    min-width: 70px;
}

.quest-timer-value {
    font-size: 24px;
    font-weight: 700;
    color: #e65100;
    font-variant-numeric: tabular-nums;
}

.quest-timer-label {
    font-size: 11px;
    color: #bf360c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-quest {
    background: #ff9500;
    color: white;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
    border: none;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.btn-quest:active {
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.35);
}

.quest-pulse {
    -webkit-animation: questTextPulse 1.5s ease-in-out infinite;
    animation: questTextPulse 1.5s ease-in-out infinite;
}

@-webkit-keyframes questPulse {
    0%, 100% { -webkit-transform: scale(1); box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35); }
    50% { -webkit-transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5); }
}
@keyframes questPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5); }
}

@-webkit-keyframes questTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes questTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Always Tasks */
.always-task-item {
    cursor: pointer;
}

.always-task-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff3e0;
    border: 2.5px solid #ffcc80;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    font-size: 18px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.always-task-btn.always-task-done {
    background: #34c759;
    border-color: #34c759;
    -webkit-animation: checkBounce 0.4s ease;
    animation: checkBounce 0.4s ease;
}

.always-task-count {
    background: #ff9500;
    color: white;
    border-radius: 10px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
}

/* Utility */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-12 { gap: 12px; }

.flex-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.flex-1 {
    -webkit-flex: 1;
    flex: 1;
}

/* Keyframe animations */
@-webkit-keyframes checkBounce {
    0% { -webkit-transform: scale(1); }
    30% { -webkit-transform: scale(1.3); }
    50% { -webkit-transform: scale(0.9); }
    70% { -webkit-transform: scale(1.1); }
    100% { -webkit-transform: scale(1); }
}
@keyframes checkBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@-webkit-keyframes petBobble {
    0%, 100% { -webkit-transform: translateY(0); }
    50% { -webkit-transform: translateY(-4px); }
}
@keyframes petBobble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@-webkit-keyframes celebrationPop {
    0% { -webkit-transform: scale(0.5); opacity: 0; }
    70% { -webkit-transform: scale(1.05); }
    100% { -webkit-transform: scale(1); opacity: 1; }
}
@keyframes celebrationPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

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

.fade-in {
    -webkit-animation: fadeIn 0.3s ease forwards;
    animation: fadeIn 0.3s ease forwards;
}

.mt-12 { margin-top: 12px; }

/* ===== PET TAB BAR ===== */
.pet-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: -webkit-flex;
    display: flex;
    background: #ffffff;
    border-top: 1px solid #e5e5ea;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
    z-index: 200;
}

.pet-tab-btn {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    border-radius: 12px;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    gap: 2px;
}

.pet-tab-btn.active {
    background: rgba(124, 77, 255, 0.08);
}

.pet-tab-emoji {
    font-size: 24px;
    line-height: 1;
}

.pet-tab-label {
    font-size: 10px;
    font-weight: 500;
    color: #8e8e93;
}

.pet-tab-btn.active .pet-tab-label {
    color: #7c4dff;
    font-weight: 600;
}

/* Add padding at bottom for tab bar */
#pet-tab-content {
    padding-bottom: 80px;
    width: 100%;
    max-width: 800px;
}

/* ===== SHOP STYLES ===== */
.shop-wrapper {
    width: 100%;
}

.shop-categories {
    display: -webkit-flex;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    margin-bottom: 16px;
}

.shop-cat-btn {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 2px;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    font-size: 24px;
    min-width: 64px;
}

.shop-cat-btn.active {
    background: #7c4dff;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.25);
}

.shop-cat-btn.active .shop-cat-name {
    color: #ffffff;
}

.shop-cat-name {
    font-size: 11px;
    font-weight: 600;
    color: #8e8e93;
}

.shop-items {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
}

.shop-item-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    width: calc(50% - 6px);
    min-width: 140px;
    max-width: 200px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    text-align: center;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shop-item-card.locked {
    opacity: 0.5;
}

.shop-item-card.owned {
    border: 2px solid #34c759;
}

.shop-item-emoji {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 4px;
}

.shop-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

.shop-item-price {
    margin-top: 2px;
}

.shop-price-tag {
    font-size: 16px;
    font-weight: 700;
    color: #ff9500;
}

.shop-price-tag.too-expensive {
    color: #d1d1d6;
}

.shop-item-lock {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 600;
}

.shop-item-owned {
    font-size: 14px;
    color: #34c759;
    font-weight: 700;
}

.shop-item-count {
    font-size: 12px;
    color: #8e8e93;
}

.shop-buy-btn {
    margin-top: 4px;
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    background: #ff9500;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    min-height: 36px;
}

.shop-buy-btn:active {
    -webkit-transform: scale(0.95);
    transform: scale(0.95);
}

.shop-buy-btn.disabled {
    background: #e5e5ea;
    color: #8e8e93;
    cursor: default;
}

.shop-status {
    text-align: center;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    opacity: 0;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

.shop-status.show {
    opacity: 1;
}

/* ===== SHOP UPGRADE CARDS ===== */
.shop-upgrade-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px;
    width: calc(50% - 6px);
    min-width: 150px;
    max-width: 200px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.shop-uc-name {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
}

.shop-uc-stars {
    display: -webkit-flex;
    display: flex;
    gap: 2px;
}

.shop-uc-stars .star {
    font-size: 16px;
    color: #ddd;
}

.shop-uc-stars .star.filled {
    color: #ffc107;
}

.shop-uc-preview {
    width: 80px;
    height: 80px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-direction: column;
    flex-direction: column;
}

.shop-uc-img {
    max-width: 80px;
    max-height: 70px;
    object-fit: contain;
}

.shop-uc-img-locked {
    opacity: 0.35;
    -webkit-filter: grayscale(0.8);
    filter: grayscale(0.8);
}

.shop-uc-current-name {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.shop-uc-next {
    width: 100%;
    text-align: center;
}

.shop-uc-next-name {
    font-size: 12px;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 4px;
}

.shop-uc-maxlvl {
    font-size: 14px;
    font-weight: 700;
    color: #7c4dff;
    padding: 6px 0;
}

.shop-uc-locked {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 600;
    padding: 6px 0;
}

/* ===== PLAY STYLES ===== */
.play-wrapper {
    width: 100%;
}

.play-pet-area {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    margin-bottom: 12px;
}

.play-status {
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #1c1c1e;
    min-height: 28px;
    margin-bottom: 16px;
    opacity: 0;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
}

.play-status.show {
    opacity: 1;
}

.play-buttons {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    max-width: 420px;
    margin: 0 auto;
}

.play-btn {
    width: calc(33.33% - 8px);
    min-width: 100px;
    padding: 16px 8px;
    border: none;
    border-radius: 16px;
    background: #ffffff;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.play-btn:active {
    -webkit-transform: scale(0.93);
    transform: scale(0.93);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.play-btn.disabled {
    opacity: 0.45;
    cursor: default;
}

.play-btn.no-items {
    opacity: 0.45;
}

.play-btn-emoji {
    font-size: 36px;
    line-height: 1;
}

.play-btn-label {
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1e;
}

.play-cooldown {
    font-size: 10px;
    color: #ff3b30;
    font-weight: 600;
}

/* ===== PLAY ITEM PICKER ===== */
.play-picker-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 16px 0;
}

.play-picker-item {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f2f2f7;
    cursor: pointer;
    min-width: 85px;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.play-picker-item:active {
    -webkit-transform: scale(0.93);
    transform: scale(0.93);
    background: #e5e5ea;
}

.play-picker-emoji {
    font-size: 40px;
    line-height: 1;
}

.play-picker-name {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1e;
}

.play-picker-count {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
}

/* ===== ROOM ITEM PICKER ===== */
.room-item-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    -webkit-justify-content: center;
    justify-content: center;
    margin: 16px 0;
}

.room-item-pick {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    background: #f2f2f7;
    cursor: pointer;
    min-width: 80px;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.room-item-pick:active {
    -webkit-transform: scale(0.93);
    transform: scale(0.93);
    background: #e5e5ea;
}

/* ===== THEME PICKER ===== */
.theme-picker {
    display: -webkit-flex;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
}

.theme-option {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    min-width: 72px;
    padding: 8px;
    border-radius: 14px;
    border: 3px solid transparent;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.theme-option.active {
    border-color: #7c4dff;
    background: rgba(124,77,255,0.05);
}

.theme-option.locked {
    opacity: 0.6;
}

.theme-preview {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.theme-name {
    font-size: 11px;
    font-weight: 600;
    color: #1c1c1e;
}

.theme-price {
    font-size: 10px;
    color: #ff9500;
    font-weight: 700;
}

/* ===== TOAST ===== */
.toast-msg {
    position: fixed;
    bottom: 90px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    background: #1c1c1e;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    z-index: 3000;
    white-space: nowrap;
    -webkit-animation: toastIn 0.3s ease;
    animation: toastIn 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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