/* --- RESET & FONT --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* SFONDO WARM/ORANGE CORALLO CON GRADIENTE */
body {
    background: linear-gradient(135deg, #ffa07a, #ff7e5f);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 30px 15px;
    position: relative;
    overflow-x: hidden;
}

.main-container {
    width: 100%;
    max-width: 750px;
    z-index: 10;
}

/* --- SFONDO DINAMICO ANIMATO (PARTICELLE) --- */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    bottom: -50px;
    font-size: 1.5rem;
    animation: floatUp linear infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 0.7;
    }
    80% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* --- APP HEADER --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-badge {
    background: #ffffff;
    color: #d97706;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* --- CARDS TERRACOTTA / CALDE --- */
.card {
    background: #b86b53;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.card h2 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin: 20px 0;
}

/* --- PROVIDERS ACCESSO (GOOGLE & TELEFONO) --- */
.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.btn-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background 0.2s ease;
}

.btn-provider:hover {
    transform: translateY(-2px);
}

.google-btn {
    background: #ffffff;
    color: #444444;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.phone-btn {
    background: #25d366;
    color: #ffffff;
}

.divider-text {
    text-align: center;
    margin: 18px 0;
    position: relative;
}

.divider-text span {
    background: #b86b53;
    padding: 0 12px;
    font-size: 0.85rem;
    color: #ffe3d8;
    font-weight: 600;
}

/* --- TAB AUTH (ACCEDI / REGISTRATI) --- */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #ffffff;
    color: #ff2a6d;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- FORMS & INPUT BIANCHI E MORBIDI --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    color: #333333;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

input:focus, textarea:focus, select:focus {
    outline: 3px solid #ff2a6d;
}

/* --- BOTTONI PRINCIPALI --- */
.btn-primary {
    background: #ff2a6d;
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 42, 109, 0.35);
}

.btn-primary:hover {
    background: #e0205c;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #ffffff;
    color: #b86b53;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

/* --- PROFILO UTENTE --- */
.profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.15);
    padding: 18px;
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

.avatar-container img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
}

.profile-info h3 {
    font-size: 1.2rem;
    color: #ffffff;
}

.nick-tag {
    color: #ffe3d8;
    font-size: 0.88rem;
    font-weight: 600;
}

.bio-text {
    font-size: 0.9rem;
    color: #f1f1f1;
    margin-top: 4px;
}

.badge {
    background: #ff2a6d;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 3px 9px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 700;
}

/* --- STREAK & CHAT --- */
.streak-box {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 16px;
    margin: 15px 0;
}

.flame-icon {
    font-size: 3.5rem;
}

.streak-counter {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 5px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 10px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

/* --- SHOP (SCHEDE BIANCHE PULITE) --- */
.shop-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.shop-item-card {
    background: #ffffff;
    color: #333333;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shop-item-card h4 {
    font-size: 1rem;
    color: #b86b53;
    margin-bottom: 6px;
}

.shop-item-card .price {
    color: #d97706;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.shop-item-card.owned {
    opacity: 0.6;
}

/* --- PANNELLO DEVELOPER --- */
.dev-card {
    background: #944a36;
    border: 2px solid #ffd700;
}

.dev-badge {
    background: #ffd700;
    color: #b86b53;
    padding: 3px 9px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: bold;
}

.dev-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.dev-control-box {
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 12px;
}

/* --- EFFETTI FIAMMA --- */
.flame-yellow { color: #ffd700; }
.flame-dark-red { color: #8b0000; }
.flame-purple { color: #9400d3; }
.flame-blue { color: #00bfff; }
.flame-rainbow {
    background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- UTILITIES --- */
.hidden { display: none !important; }
.warning-text {
    font-size: 0.85rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 10px;
}
.small-text { font-size: 0.85rem; color: #ffe3d8; }