:root {
    --primary: #FF8C42;
    --primary-dark: #E67A2E;
    --secondary: #FFF5E6;
    --text-dark: #2C2C2C;
    --text-light: #666;
    --bg-light: #FFF9F0;
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --max-width: 480px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px;
    width: 100%;
}

/* Responsividade Mobile */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    body {
        font-size: 14px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 15px;
    width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid #E5E5E5;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .form-control {
        font-size: 16px; /* Evita zoom no iOS */
        padding: 12px 14px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
}

/* Category Cards */
.category-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

@media (max-width: 768px) {
    .category-card {
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 12px;
    }
}

.category-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.category-card.selected {
    border-color: var(--primary);
    background: #FFF5E6;
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-right: 12px;
    }
}

.category-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.category-info p {
    font-size: 14px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .category-info h3 {
        font-size: 15px;
        margin-bottom: 2px;
    }
    
    .category-info p {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .header {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
}

/* Landing Page */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero-image {
    width: 100%;
    max-width: 300px;
    border-radius: var(--border-radius);
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-change {
    font-size: 12px;
    color: #7ED321;
    font-weight: 600;
}

/* Fortune Display */
.fortune-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.fortune-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    max-width: 400px;
    margin: 20px;
    text-align: center;
}

.fortune-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.fortune-text {
    font-size: 18px;
    font-style: italic;
    line-height: 1.6;
    margin: 24px 0;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
}

.fortune-numbers {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.fortune-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    z-index: 1000;
    border: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 140, 66, 0.6);
}

@media (max-width: 768px) {
    .fab {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    body {
        padding-bottom: 60px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    padding: 6px 12px;
    transition: all 0.3s;
    border-radius: 12px;
}

.mobile-nav-item.active {
    color: var(--primary);
    background: var(--secondary);
}

.mobile-nav-item span {
    font-size: 22px;
}

/* Scroll horizontal melhorado */
.filter-scroll {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #E5E5E5;
}

.filter-scroll::-webkit-scrollbar {
    height: 6px;
}

.filter-scroll::-webkit-scrollbar-track {
    background: #E5E5E5;
    border-radius: 10px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.filter-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .filter-scroll {
        padding-bottom: 12px;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Mobile Back Button */
.mobile-back {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    color: var(--text-dark);
    z-index: 999;
    transition: all 0.3s;
    opacity: 0.6;
}

.mobile-back:hover {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-back {
        display: flex;
    }
}

/* Settings Fixed Button */
.settings-fixed-btn {
    display: none;
}

@media (min-width: 769px) {
    .settings-fixed-btn {
        display: flex;
        position: fixed;
        bottom: 24px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: white;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        border: none;
        color: var(--primary);
        cursor: pointer;
        z-index: 999;
        transition: all 0.3s;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    
    .settings-fixed-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(0,0,0,0.2);
    }
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #F0F0F0;
}
@media (max-width: 768px) {
    .container {
        padding: 12px;
        padding-bottom: 80px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .category-card {
        padding: 16px;
    }
    
    .stats {
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* Upload de Foto */
.photo-upload {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: inline-block;
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-upload-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px dashed var(--primary);
}

/* OAuth Buttons */
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 15px;
}

.oauth-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.oauth-btn img {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .oauth-btn {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
}

p {
    line-height: 1.6;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    h1 {
        font-size: 22px;
        text-align: center;
    }
    
    h2 {
        font-size: 20px;
        text-align: center;
    }
    
    h3 {
        font-size: 16px;
    }
    
    h4 {
        font-size: 15px;
    }
    
    p {
        font-size: 14px;
    }
}
