/* iPhone App-like Design */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app {
    max-width: 414px;
    margin: 0 auto;
    background: #f8f9fa;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Responsive scaling for larger screens */
@media (min-width: 768px) {
    .app {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .app-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
    
    .star-count-section {
        grid-column: span 2;
    }
    
    .child-section {
        grid-column: span 1;
        min-width: 0;
    }
    
    .actions-card {
        grid-column: span 1;
        min-width: 0;
    }
    
    .manage-card {
        grid-column: span 2;
        min-width: 0;
    }
    
    .star-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .app {
        max-width: 1400px;
        padding: 0 40px;
    }
    
    .app-main {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 24px;
        align-items: start;
    }
    
    .star-count-section {
        grid-column: span 3;
    }
    
    .child-section {
        grid-column: span 1;
        min-width: 0;
    }
    
    .actions-card {
        grid-column: span 1;
        min-width: 0;
    }
    
    .manage-card {
        grid-column: span 3;
        min-width: 0;
    }
    
    .star-cards-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .app {
        max-width: 1600px;
    }
}

.app-header {
    background: #007AFF;
    color: white;
    padding: 20px 16px 16px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.app-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.app-main {
    padding: 20px;
    padding-bottom: 100px; /* Space for bottom actions */
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.card h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1c1c1e;
}

/* Print Button - Primary Action */
.print-card {
    background: linear-gradient(135deg, #007AFF 0%, #5856d6 100%);
    color: white;
    text-align: center;
}

.primary-button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-button:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.button-icon {
    font-size: 20px;
}

/* Star Count Section */
.star-count-section {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffeaa7;
    margin-bottom: 24px;
}

.star-count-section h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1c1c1e;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.star-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.star-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.15);
    border: 2px solid #ffeaa7;
    transition: all 0.3s ease;
}

.star-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255, 149, 0, 0.25);
}

.star-card-header {
    margin-bottom: 16px;
}

.star-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
}

.star-count-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.star-number {
    font-size: 48px;
    font-weight: 900;
    color: #ff9500;
    line-height: 1;
}

.star-icon {
    font-size: 36px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Child Sections */
.child-section {
    margin-bottom: 24px;
    border: 1px solid #e5e5e7;
    overflow: hidden;
}

.child-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e5e5e7;
}

.child-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.child-header h2::before {
    content: "👤";
    font-size: 24px;
}

/* Child-specific print buttons */
.print-section {
    padding: 20px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e7;
}

.child-print-button {
    background: linear-gradient(135deg, #007AFF 0%, #5856d6 100%);
    color: white;
    border: none;
    padding: 18px 28px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.child-print-button:hover {
    background: linear-gradient(135deg, #0056cc 0%, #4a4ae8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    color: white;
}

.child-print-button:active {
    transform: translateY(0);
}

/* Chores Section */
.chores-section {
    padding: 20px;
    background: white;
}

.chores-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chores-section h3::before {
    content: "📋";
    font-size: 20px;
}

/* Chores List */
.chores-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.chore-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e7;
    transition: all 0.2s ease;
}

.chore-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.chore-item label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.chore-checkbox {
    width: 22px;
    height: 22px;
    accent-color: #007AFF;
    cursor: pointer;
}

/* Approval Buttons */
.approval-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.approve-btn, .delete-btn {
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.approve-btn {
    background: linear-gradient(135deg, #007AFF 0%, #0056cc 100%);
}

.approve-btn:hover {
    background: linear-gradient(135deg, #0056cc 0%, #003d99 100%);
    transform: translateY(-1px);
}

.approve-btn::before {
    content: "✅";
}

.delete-btn {
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #d70015 0%, #a5000e 100%);
    transform: translateY(-1px);
}

.delete-btn::before {
    content: "🗑️";
}

/* Buttons */
.secondary-button {
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.secondary-button:hover {
    opacity: 0.9;
}

/* Quick Actions */
.actions-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.spend-points-section {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .spend-points-section {
        flex-wrap: nowrap;
    }
}

.select-input, .number-input {
    padding: 14px 16px;
    border: 2px solid #d1d1d6;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
}

.select-input:focus, .number-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.select-input {
    flex: 1;
    min-width: 150px;
}

.number-input {
    width: 100px;
}

.action-button {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2);
}

.action-button:hover {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.3);
}

.action-button::before {
    content: "💰";
}

/* Manage Chores */
.manage-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.manage-list {
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.manage-chore-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e7;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.manage-chore-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.manage-chore-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 16px;
    border: 2px solid #e5e5e7;
}

.manage-chore-item span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.manage-chore-item button {
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.manage-chore-item button:hover {
    background: linear-gradient(135deg, #d70015 0%, #a5000e 100%);
    transform: scale(1.05);
}

.manage-chore-item button::before {
    content: "🗑️";
}

/* Add Form */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #d1d1d6;
}

.text-input, .file-input {
    padding: 16px;
    border: 2px solid #d1d1d6;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
}

.text-input:focus, .file-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.add-button {
    background: linear-gradient(135deg, #007AFF 0%, #5856d6 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.add-button:hover {
    background: linear-gradient(135deg, #5856d6 0%, #4a4ae8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.add-button::before {
    content: "➕";
    font-size: 20px;
}

/* Message Area */
.message-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border-top: 3px solid #007AFF;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
}

@media (min-width: 768px) {
    .message-area {
        max-width: 768px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        border-radius: 20px 20px 0 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #8e8e93;
    font-style: italic;
    padding: 40px 20px;
    font-size: 18px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #d1d1d6;
}

.empty-state::before {
    content: "📝";
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 480px) {
    .app {
        padding: 0;
    }
    
    .app-main {
        padding: 16px;
    }

    .child-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .child-header h2 {
        font-size: 20px;
    }
    
    .child-print-button {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .approval-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .spend-points-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .select-input, .number-input {
        width: 100%;
    }
}

/* Tablet Display Styles */
.tablet-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tablet-display .app-header {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    padding: 24px 16px;
}

.tablet-display .app-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tablet-display .app-main {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.tablet-star-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    width: 100%;
    max-width: 1200px;
}

.tablet-star-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border: 4px solid #ffeaa7;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tablet-star-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(90deg, #ff9500, #ff6b00, #ff9500);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tablet-star-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

.tablet-star-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.tablet-star-number {
    font-size: 120px;
    font-weight: 900;
    color: #ff9500;
    line-height: 1;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.1);
    animation: numberPulse 2s infinite;
    margin-bottom: 20px;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tablet-star-label {
    font-size: 24px;
    font-weight: 800;
    color: #8e8e93;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Tablet Responsive */
@media (max-width: 768px) {
    .tablet-star-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .tablet-star-card {
        padding: 40px 30px;
        min-height: 250px;
    }
    
    .tablet-star-number {
        font-size: 80px;
    }
    
    .tablet-star-label {
        font-size: 20px;
    }
}

@media (min-width: 1200px) {
    .tablet-star-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tablet-star-number {
        font-size: 140px;
    }
}

/* Scrollbar Styling */
.chores-list::-webkit-scrollbar,
.manage-list::-webkit-scrollbar {
    width: 8px;
}

.chores-list::-webkit-scrollbar-track,
.manage-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chores-list::-webkit-scrollbar-thumb,
.manage-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chores-list::-webkit-scrollbar-thumb:hover,
.manage-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}