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

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at 0 0, #8b5cf6, #4f46e5 40%, #1f2937);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 48px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}

.header {
    margin-bottom: 32px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.logo-fallback {
    text-align: center;
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    color: #6d28d9;
    letter-spacing: 2px;
}

.main h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 12px;
}

.description {
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.6;
}

.btn-download {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.note {
    margin-top: 20px;
    font-size: 0.875rem;
    color: #9ca3af;
}

.unavailable {
    color: #9ca3af;
    font-style: italic;
}

.login-required {
    color: #6b7280;
}

.login-required a {
    color: #4f46e5;
    text-decoration: none;
}

.login-required a:hover {
    text-decoration: underline;
}

.user-bar {
    margin-top: 12px;
    font-size: 0.875rem;
    color: #6b7280;
}

.user-bar .link-register,
.user-bar .link-logout {
    margin-left: 12px;
    color: #4f46e5;
    text-decoration: none;
}

.user-bar .link-register:hover,
.user-bar .link-logout:hover {
    text-decoration: underline;
}

/* Formulários de auth */
.auth-form {
    text-align: left;
    margin-bottom: 20px;
}

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

.field-label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-footer a {
    color: #4f46e5;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.messages {
    margin-bottom: 20px;
}

.flash {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.flash-error {
    background: #fef2f2;
    color: #b91c1c;
}

.flash-success {
    background: #f0fdf4;
    color: #15803d;
}

.flash-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #9ca3af;
}
