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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px 20px 20px 50px;
}

.container {
    width: 380px;
    height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transform: translateX(30px) scale(0.70);
    transform-origin: top center;
}

.container.logged-in {
    width: 400px;
    height: 460px;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    padding: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    flex-shrink: 0;
}

.header h1 {
    color: #333;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(79, 172, 254, 0.3);
    font-size: 0.8em;
}

.alert {
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease-out;
    font-size: 0.8em;
}

.alert-error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.alert-success {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.auth-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.logged-in .auth-container {
    display: none;
}

.auth-form {
    flex: 1;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
}

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

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-1px);
}

.btn {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(81, 207, 102, 0.6);
}

.btn-large {
    padding: 10px 12px;
    font-size: 11px;
    margin-bottom: 6px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.4);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 12px;
    min-height: 40px;
    line-height: 1.2;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    overflow: hidden;
}

.cash-display {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.cash-amount {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
    display: inline-block;
    min-width: 150px;
}

.cash-icon {
    font-size: 1.4em;
    display: block;
    margin-bottom: 6px;
}

.cash-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cash-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.actions {
    text-align: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.claim-form {
    margin-bottom: 8px;
}

.btn-bonus {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 15px;
    margin-left: 10px;
    font-size: 0.9em;
    font-weight: 700;
}

.daily-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    margin-bottom: 0;
}

.daily-info p {
    margin: 2px 0;
    color: #666;
    font-size: 0.75em;
}

.logout-section {
    text-align: center;
    margin-top: 15px;
    padding: 5px 0;
    flex-shrink: 0;
}

.logout-section .btn-danger {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    padding: 8px 15px;
    font-size: 11px;
}

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

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

.btn-success:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Responsividade para telas menores */
@media (max-width: 650px) {
    .container {
        width: 95vw;
        height: 95vh;
    }
    
    .auth-container {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .user-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Ajuste para rodar embutido no launcher (altura 447px, largura ~607px) */
@media (max-height: 500px) {
    /* sem alterações globais aqui */
}

/* Modo Launcher: reduz proporcionalmente a altura para 447px */
body.launcher {
    padding: 0;
    overflow: hidden;
    min-height: 447px;
    height: 447px;
    justify-content: flex-start;
    align-items: flex-start;
}
body.launcher .container,
body.launcher .container.logged-in {
    width: 380px; /* mantém proporção original */
    height: 620px; /* base de cálculo */
    transform: scale(0.70); /* escala global do painel no launcher */
    transform-origin: top left;
    margin: 5px 0 0 30px;
}
