:root {
    --bg-color: #0d0d12;
    --primary-color: #f72585;
    --secondary-color: #4361ee;
    --text-color: #ffffff;
    --glass-bg: rgba(25, 25, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(247, 37, 133, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(67, 97, 238, 0.15), transparent 25%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 40px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

input[type="url"] {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

input[type="url"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="url"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.btn-glow {
    position: relative;
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(247, 37, 133, 0.4);
}

.btn-glow:hover::before {
    opacity: 1;
}

.btn-glow:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

#status-text {
    font-size: 0.95rem;
    color: #bbb;
    line-height: 1.5;
    word-break: break-word;
}

.success-text {
    color: #4ade80 !important;
}

.error-text {
    color: #f87171 !important;
}

.download-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 12px 25px;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid #4ade80;
    border-radius: 30px;
    color: #4ade80;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-pill:hover {
    background: rgba(74, 222, 128, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Install button (for PWA) */
.install-action {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.install-action:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.install-action:active {
    transform: translateY(0);
}

/* Toast para instalação */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    width: max-content;
    max-width: 90%;
}

.toast.show {
    bottom: 30px;
}

.toast p {
    font-size: 0.9rem;
    margin: 0;
}

.btnInstall {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.btnClose {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}
